我需要一个eclipse的正则表达式,如果它位于<formula>
标签中的某个位置,则会找到字符串XYZ。它当然也跨越多行。
如果更容易,我可以在记事本++中执行此操作
<formula>
potential stuff. could be in tags
XYZ
potential stuff. could be in tags
</formula>
答案 0 :(得分:0)
使用:(?m)(?s)<formula>.*(XYZ).*</formula>
参考Eclipse File Search Dialog - Regular Expression for Group Unions and Negation 和 Eclipse file search pattern for exactly two occurences