regex RexEx与最后一个组不匹配

9avjhtql  于 12个月前  发布在  其他
关注(0)|答案(1)|浏览(116)

我有以下RegEx

(.*?)(>=|<=|~|!=|=|!~|>|<| IS | IS NOT | WAS | WAS IN | WAS NOT | WAS NOT IN | CHANGED | OR | AND | IN | NOT IN )

字符串
它几乎匹配我所有的测试文本:

project=blah AND blah=something OR issuetype!="blah" AND someissue IN somefunction("blah") OR blahing <= "something"


它只是不匹配最后一个“something”字符串,我明白为什么,但我很难把一些东西放进表达式中,以捕获最终值。

new9mtju

new9mtju1#

我觉得他已经成功了

((.*?)(>=|<=|~|!=|=|!~|>|<| IS | IS NOT | WAS | WAS IN | WAS NOT | WAS NOT IN | CHANGED | OR | AND | IN | NOT IN ))|(.*?)$

字符串

相关问题