Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex XSLT中的正则表达式_Regex_Xslt - Fatal编程技术网

Regex XSLT中的正则表达式

Regex XSLT中的正则表达式,regex,xslt,Regex,Xslt,有人能帮我理解下面XSLT中的常规表达式吗 regexp:match(test-graph.api.example.com, '(?=CN).*\.(.*)(\.)(.*)(?&lt;=com)', 'i') 输出是什么以及如何解释这个正则表达式 请让我知道应该这样读: (?=CN).*\.(.*)(\.)(.*)(?<=com) 参见 .* matches any character (except for line terminators) * Quantifier

有人能帮我理解下面XSLT中的常规表达式吗

regexp:match(test-graph.api.example.com, '(?=CN).*\.(.*)(\.)(.*)(?&lt;=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