Community
    • Login

    Both sides of Tag in notepad++

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dolan HD
      Dolan H
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • cipher-1024C
        cipher-1024
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • Dolan HD
          Dolan H
          last edited by

          Thank you.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors