Navigation

    Community

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

    Change and move a string

    Help wanted · · · – – – · · ·
    3
    5
    129
    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.
    • Knowledge Base
      Knowledge Base last edited by

      Hello,

      I tried a lot, but nothing worked.
      How to move a text in a line?
      The lines look about this:

      [combobox “Text 1”][button “Expand List”]‘/>
      [combobox “Text 2”][button “Expand List”]’/>
      [combobox “Text 3”][button “Expand List”]'/>

      and I want to change it like this:
      [group “Text 1”].combobox[button “Expand List”]‘/>
      [group “Text 2”].combobox[button “Expand List”]’/>
      [group “Text 3”].combobox[button “Expand List”]'/>

      Can anybody help me

      Thanks a lot

      Ekopalypse 2 Replies Last reply Reply Quote 1
      • Ekopalypse
        Ekopalypse @Knowledge Base last edited by

        @Knowledge-Base
        find what:([(combobox) (".+")])
        replace with:[group \3]\.\2

        because [ and ] and . do have special meanings in regex, they need to be escaped
        in order to treat them literally.

        1 Reply Last reply Reply Quote 0
        • Ekopalypse
          Ekopalypse @Knowledge Base last edited by

          @Knowledge-Base

          sorry, find what is to broad, use : ([(combobox) (".+?")])

          1 Reply Last reply Reply Quote 2
          • Knowledge Base
            Knowledge Base last edited by

            Hello Ekopalypse ,

            okay, I’ve tried a completely wrong path.
            1447 replaces in less than 1 second - I’m happy :-)

            Thanks al lot for you help.

            1 Reply Last reply Reply Quote 3
            • guy038
              guy038 last edited by guy038

              Hello, @knowledge-base, @ekopalypse,

              I was away from the N++ community since more than a month ( see my post below )

              https://community.notepad-plus-plus.org/post/47895

              So, just for info ! The @ekopalypse solution can even be shortened :

              FIND combobox( ".+?"])

              REPLACE group\1.combobox

              Best Regards,

              guy038

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