Regex XSLT中的正则表达式
有人能帮我理解下面XSLT中的常规表达式吗Regex XSLT中的正则表达式,regex,xslt,Regex,Xslt,有人能帮我理解下面XSLT中的常规表达式吗 regexp:match(test-graph.api.example.com, '(?=CN).*\.(.*)(\.)(.*)(?<=com)', 'i') 输出是什么以及如何解释这个正则表达式 请让我知道应该这样读: (?=CN).*\.(.*)(\.)(.*)(?<=com) 参见 .* matches any character (except for line terminators) * Quantifier
regexp:match(test-graph.api.example.com, '(?=CN).*\.(.*)(\.)(.*)(?<=com)', 'i')
输出是什么以及如何解释这个正则表达式
请让我知道应该这样读:
(?=CN).*\.(.*)(\.)(.*)(?<=com)
参见
.* matches any character (except for line terminators)
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
\. matches the character . literally (case sensitive)
1st Capturing Group (.*)
.* matches any character (except for line terminators)
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
2nd Capturing Group (\.)
\. matches the character . literally
3rd Capturing Group (.*)
.* matches any character (except for line terminators)
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
Positive Lookbehind (?<=com)
Assert that the Regex below matches
com matches the characters com literally