无法对工作进行简单的负面评价。
在此项目列表中,我不希望开头为Re:
的项目
Re: [PAID] need Composer for Film
[PAID] need Composer for Film
want composer for project
我实际上是通过结束结尾的问号来完成此工作的:
(?!(.*\?$))((create|after......
,因此它与底部结果不匹配。
[PAID] need Composer for Film
want composer for project
need composer?
但是一开始就无法为Re:
使用相同的原理。
/(?!(^Re:.*$))((create|after|(attention|need|require?|want|seek)(s|ing|ed)*.?.?|(look|search)(ing|s|es)*( for| to work (with|for))( | an* ))(\w)*( ?)(film|movie|instrumental|original|background)*( ?)((?!(musician|composit|music video))(music|compos|(audio|sound)( ?)track|((theme)*( ?)(tune|song))|scor(e|ing)|jingle)))/ig
答案 0 :(得分:2)
本质上,您是在问如何匹配整个字符串-如果字符串不是不是以Re:
开头。
在负前瞻范围内使用Re:
,行锚起点 ^
在前瞻范围之外,行锚终点在前瞻中,您会得到:
/^(?!Re:.*$).*/gm
See it 在regex101上的作用