• Login
Community
  • Login

Find an replace

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 3 Posters 1.3k 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.
  • T
    Thirsty for Knowledge
    last edited by Apr 9, 2019, 12:20 PM

    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

    E A 2 Replies Last reply Apr 9, 2019, 12:30 PM Reply Quote 0
    • E
      Ekopalypse @Thirsty for Knowledge
      last edited by Apr 9, 2019, 12:30 PM

      @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
      • A
        Alan Kilborn @Thirsty for Knowledge
        last edited by Apr 9, 2019, 12:34 PM

        @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
        • T
          Thirsty for Knowledge
          last edited by Apr 9, 2019, 12:42 PM

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

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