Community

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

    Find an replace

    Help wanted · · · – – – · · ·
    3
    4
    439
    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 Knowledge
      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

      Ekopalypse Alan Kilborn 2 Replies Last reply Reply Quote 0
      • Ekopalypse
        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 Kilborn
          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 Knowledge
            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
            Copyright © 2014 NodeBB Forums | Contributors