加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-14 06:28:59 所属栏目:百科 来源:网络整理
导读:哪些字符可以用作Perl正则表达式的分隔符? m / re /,m(re)和m?re?都似乎工作,但我想知道所有的可能性. 从 perlop : With the m you can use any pair of non-whitespace characters as delimiters. 所以任何事情都会发生,除了空白.这一切的全部是: If “/
哪些字符可以用作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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读