Community
    • Login

    Find an replace

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 1.2k Views
    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
      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
        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
          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
            Thirsty for Knowledge
            last edited by

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

            1 Reply Last reply Reply Quote 2
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors