多行正则表达式帮助日食? [英] multiline regular expression help in eclipse?

查看:130
本文介绍了多行正则表达式帮助日食?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个eclipse的正则表达式,如果它位于< formula> 标签中的某个位置,则会找到字符串XYZ。

I need a regular expression for eclipse that finds the string XYZ if it's somewhere in the <formula> tags. it is certainly across multiple lines too.

如果更容易,我可以在记事本++中执行此操作

If easier, i can do this in notepad++

<formula>
    potential stuff. could be in tags
    XYZ 
    potential stuff. could be in tags
</formula>


推荐答案

使用: )(?s)< formula> *(XYZ)*< / formula>

参考 Eclipse文件搜索对话框 - 组联合和否定的正则表达式

Eclipse文件搜索两种情况的模式

这篇关于多行正则表达式帮助日食?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆