[[:>:]] or [[:<:]] don't match

后端 未结 2 616
别那么骄傲
别那么骄傲 2021-01-18 08:50

I\'m trying to use [[:>:]] in my regex but they are not accepted while other character classes e.g. [[:digit:]] or [[:word:]] are.

2条回答
  •  情书的邮戳
    2021-01-18 09:41

    You can use \b(?<=d) or \b(?=d) instead. In any case PCRE engine converts [[:<:]] to \b(?=\w) and [[:>:]] to \b(?<=\w) before starting the match.

提交回复
热议问题