Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    find and replace

    Help wanted · · · – – – · · ·
    2
    3
    538
    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.
    • Ivan Kuzmich
      Ivan Kuzmich last edited by

      Hello. I have text like this.
      3h3s2h2s
      3d3h2h2s
      3c3h2h2s
      And i need replace every 3h 3s … to that <img src=“3h.png”><img src=“3s.png”> …
      thank you in advance.

      Meta Chuh 1 Reply Last reply Reply Quote 0
      • Meta Chuh
        Meta Chuh @Ivan Kuzmich last edited by Meta Chuh

        welcome to the notepad++ community, @Ivan-Kuzmich

        if you have a text like:

        3h3s2h2s
        3d3h2h2s
        3c3h2h2s
        

        open up the notepad++ menu search > replace and enter the following:

        search what: ([0-9][a-z])
        replace with: <img src="$1.png">
        search mode: regular expression

        then either hit replace to replace every occurrence one by one,
        or hit replace all to parse-replace the complete file.

        note: if you have similar conflicting content in your file, select only the part you want to parse-replace and activate in selection before you hit replace all.

        the result will then be:

        <img src="3h.png"><img src="3s.png"><img src="2h.png"><img src="2s.png">
        <img src="3d.png"><img src="3h.png"><img src="2h.png"><img src="2s.png">
        <img src="3c.png"><img src="3h.png"><img src="2h.png"><img src="2s.png">
        

        if your result differs, we would need a real life example of a part of your file.

        best regards.

        1 Reply Last reply Reply Quote 2
        • Ivan Kuzmich
          Ivan Kuzmich last edited by

          Awesome. thank you!

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Copyright © 2014 NodeBB Forums | Contributors