\(([^\\(\\)]+)\)
我上面的正则表达式捕获了表单的每组括号之间的所有内容
(Hello OR there) AND (big AND wide AND world)
我懂了
Hello OR there
big AND wide AND world
但是当括号内的术语中有括号时它会下降
(Hello OR there AND messing(it)up) AND (big AND wide AND world)
退货
it
big AND wide AND world
我想
Hello OR there AND messing(it)up
big AND wide AND world
我不确定正则表达式是否可行,或者最好的方法是什么?
呼啦一阵风
相关分类