Both sides of Tag in notepad++
-
Hello. I had a question about Notepad ++. how can we change both tag side of HTML codes at the same time? Is it possible? for instance, how can I change
**<div class=“phonetic”>hello</div>
**to
**<font color=“red”>hello</font> ??
**
I want to keep the main text but change the tags of both sides at the same time with Regex or other ways in Notepad++.thanks for helping.
-
Hi Dolan,
This regex find/replace works for your example.
Find:
<div class=“phonetic”>(.*?)</div>
Replace with:
<font color=“red”>\1</font>The \1 is the contents of the () in the find.
Watch out for the quotes, the bulletin board software likes to put in fancy-schmancy quotes in place of regular quotes.HTH, good luck.
-
Thank you.