PCRE to POSIX assistance

只愿长相守 提交于 2019-12-02 01:54:10

POSIX ERE does not support inline regex modifiers, and shorthand character classes are not always supported. Note that even in your (?m)profile=(\S+) PCRE regex, the (?m) MULTILINE modifier is redudant as there is no ^, nor $ to redfine the behavior of. What you may use is a POSIX character class [:space:] (matching any whitespace) inside a negated bracket expression:

profile=([^[:space:]]+)

Details:

  • profile= - a literal substring
  • ([^[:space:]]+) - Group 1: one or more characters other than those that can be matched with [:space:] POSIX character class.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!