Community
    • Login

    Find an replace

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 1.6k 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.
    • Thirsty for KnowledgeT Offline
      Thirsty for Knowledge
      last edited by

      Hello,

      is it possible to search for a text that starts with certain characters, followed by a variable text and ends again with a certain character string?
      For example:
      location='WINDOWS[0][listbox “Text 1”][option
      location='WINDOWS[0][listbox “Text 2”][option
      location='WINDOWS[0][listbox “Text 3”][option

      should be changed to:

      location='WINDOWS[0].TABSEQUENCE[option
      location='WINDOWS[0].TABSEQUENCE[option
      location='WINDOWS[0].TABSEQUENCE[option

      Thank’s for your help

      EkopalypseE Alan KilbornA 2 Replies Last reply Reply Quote 0
      • EkopalypseE Offline
        Ekopalypse @Thirsty for Knowledge
        last edited by

        @Thirsty-for-Knowledge

        if listbox followed by a text encased in double quotes is a unique term then
        you can do something like
        find what listbox.*?".*?"
        replace with \.\t
        don’t forget checking regular expression

        1 Reply Last reply Reply Quote 2
        • Alan KilbornA Offline
          Alan Kilborn @Thirsty for Knowledge
          last edited by

          @Thirsty-for-Knowledge

          For a more direct interpretation, I suggest:

          Find (?-si)(location='WINDOWS\[0\]).*?(?=\[option)
          Repl \1.TABSEQUENCE
          Mode Regular exp

          1 Reply Last reply Reply Quote 2
          • Thirsty for KnowledgeT Offline
            Thirsty for Knowledge
            last edited by

            Great, thanks for you fast help, now I’m happy :-)

            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