Community
    • Login

    Change and move a string

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 3 Posters 859 Views 1 Watching
    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 BaseK Offline
      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

      EkopalypseE 2 Replies Last reply Reply Quote 1
      • EkopalypseE Offline
        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
        • EkopalypseE Offline
          Ekopalypse @Knowledge Base
          last edited by

          @Knowledge-Base

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

          1 Reply Last reply Reply Quote 2
          • Knowledge BaseK Offline
            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
            • guy038G Offline
              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

              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
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors