【发布时间】:2014-06-04 16:57:18
【问题描述】:
我想在 Dream weaver 中使用 Find and Replace 仅查找和替换其行包含特定字符串的单词。
【问题讨论】:
-
示例示例示例代码代码代码输出输出输出
-
请详细说明我的情况,提前致谢!
标签: regex replace find dreamweaver
我想在 Dream weaver 中使用 Find and Replace 仅查找和替换其行包含特定字符串的单词。
【问题讨论】:
标签: regex replace find dreamweaver
user3503851,Dreamweaver 具有臭名昭著的劣质正则表达式风格。不过,这是一个在 CS6 中测试过的工作示例。
我们的测试文本:
My Untitled Document Is Here
My Beautiful Document Is Here
My Document, the Beautiful
目标:将“文档”替换为“博客”,但仅在包含“美丽”一词的行中
搜索: ((?=.*?Beautiful)[^\r\n]*)(Document)
替换:$1Blog
结果:
My Untitled Document Is Here
My Beautiful Blog Is Here
My Blog, the Beautiful
【讨论】: