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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login