开发者

Using regex to select between two tags?

开发者 https://www.devze.com 2023-03-06 21:40 出处:网络
Sorry guys for my newbie question In dreamweaver i want to search and replace between two html tags </title> to <div class=\"content richcontent\">

Sorry guys for my newbie question

In dreamweaver i want to search and replace between two html tags

</title> to <div class="content richcontent">

I also searched this site but similar questions don't work with开发者_运维百科 my situation

Thanks in advance


If Dreamweaver supports regex search and replace you could use this

\>(.+)\<

I cant remember if it does/did its been many many years since ive used it.

EDIT

Quick google tells me it does! http://www.adobe.com/devnet/dreamweaver/articles/regular_expressions_pt2.html

That link also describes how to use regex for search and replace, as well as just search


To output all the text from file called "test.txt" between "FOO" and "BAR", type the following command at a shell prompt. The -n option suppress automatic printing of pattern space:

sed -n '/FOO/,/BAR/p' test.txt
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号