我需要替换以下几行:
http://www.domainname.com/media/sights/1Brooklyn_Bridge.jpg
......................................
......................................
......................................
http://www.domainname.com/media/sights/100Central_Park.jpg
到
{{media url="sights/1Brooklyn_Bridge.jpg"}}
......................................
......................................
......................................
{{media url="sights/100Central_Park.jpg"}}
我如何使用notepad ++ regex?
答案 0 :(得分:1)
正则表达式:^(http://www.domainname.com/media)(.*)$
替换:{{media url="$2"}}
答案 1 :(得分:0)
检查一下它会起作用
查找:^.*m/(.+a)/(.+)
替换:{{$1 url="$2
我在我的移动记事本上测试过