Community

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

    Find number, insert further along the line

    Help wanted · · · – – – · · ·
    2
    3
    45
    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.
    • Alexander Wilson
      Alexander Wilson last edited by

      Hi you guys!

      I have got 2550 lines where I need to search for “SM2841462” (unique for every line), and replace “XX0000000” with this - or i could delete XX000000 and insert the “SM” number here.

      Hope you can help!
      Thanks!

      <div class=“tree-branch document” onclick=“TREE.displayDoc(event, ‘SM2841462’, ‘true’)”><span title=“ABBREVIATIONS”><i class=“fa fa-file-text-o” aria-hidden=“true”></i><a href=“index%EF%B9%96page=content&id=XX0000000.html” target=“_blank”>ABBREVIATIONS</a></span></div>

      Alan Kilborn 1 Reply Last reply Reply Quote 0
      • Alan Kilborn
        Alan Kilborn @Alexander Wilson last edited by

        @Alexander-Wilson

        Try this bit of magic:

        • Regular expression Search mode
        • Find: (?-si)((SM\d{7}).*?)XX0{7}
        • Replace: ${1}${2}

        Learn more about regular expressions in Notepad++ HERE, as well as in the N++ documentation about them HERE.

        Alexander Wilson 1 Reply Last reply Reply Quote 2
        • Alexander Wilson
          Alexander Wilson @Alan Kilborn last edited by

          @Alan-Kilborn
          You are an absolute genius! That worked a treat!
          Thank you very much!

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