regex - Notepad ++正则表达式在html代码中查找文件名
问题描述
我需要在 html 代码中搜索文件名。
要搜索的文本
D: \ Fitos \ excel \ ([1-9] [0-9] *) (. Xlsx “target =” _ top "> Old pdf)
用。。。来代替
D: \ Fitos \ excel2 \ $ 2 (.xlsx “target =” _ top "> Old Pdf)
通过这个正则表达式搜索,我找到了 Excel 文件,例如 13037.xlsx
如果我想用正则表达式搜索文本 ES-00106.pdf 怎么办?
非常感谢您的帮助
解决方案
我认为正则表达式应该是:
D:\\Fitos\\excel\\([1-9][0-9]*)\.xlsx "target"="_top"> Old pdf
对于替换值,我认为您在使用第一个分组部分时需要 1 美元(整个正则表达式匹配为 0 美元),所以:
D:\Fitos\excel2\$1.xlsx "target"="_top"> Old pdf
推荐阅读
- hyperledger-fabric - 以太坊 vs Hyperledger Fabric
- redis - Redis active - 跨数据中心/Kubernetes 集群的主动复制
- random - 如何使用 Numba xoroshiro128p 创建简单的随机数组
- c# - 如何简单地从 appsettings.json 读取
- c++ - 抽象基类中接口类的友元声明
- reactjs - 如何检查 React 元素是否来自样式化组件?
- c# - 创建单选按钮组 Xamarin.iOS
- c# - 面向 netstandard 的 COM 组件
- python - 按行排列二维数组
- php - 图像文件未上传到 AJAX 中的文件夹