正则表达式 – 哪些字符可以用作正则表达式分隔符?

前端之家收集整理的这篇文章主要介绍了正则表达式 – 哪些字符可以用作正则表达式分隔符?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
哪些字符可以用作Perl正则表达式的分隔符? m / re /,m(re)和måreå都似乎工作,但我想知道所有的可能性.
perlop

With the m you can use any pair of non-whitespace characters as delimiters.

所以任何事情都会发生,除了空白.这一切的全部是:

If “/” is the delimiter then the initial m is optional. With the m you can use any pair of non-whitespace characters as delimiters. This is particularly useful for matching path names that contain “/”,to avoid LTS (leaning toothpick syndrome). If “?” is the delimiter,then the match-only-once rule of ?PATTERN? applies. If “‘” is the delimiter,no interpolation is performed on the PATTERN. When using a character valid in an identifier,whitespace is required after the m.

原文链接:https://www.f2er.com/regex/357128.html

猜你在找的正则表达式相关文章