【发布时间】:2019-06-08 06:40:31
【问题描述】:
如果只能使用正则表达式,如何提取此字符串中除“NOT”之外的星号之间的文本?
* apple * * orange tasty * * banana * * grape NOT *
预期结果:
apple
orange tasty
banana
【问题讨论】:
-
负前瞻。谷歌这个。
-
PCRE 没问题。我想用 grep -Po 来提取。
标签: regex grep pcre regex-lookarounds regex-group