Community

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

    Very Simple Replace Problem - but Newbie

    Help wanted · · · – – – · · ·
    2
    5
    1182
    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.
    • Harry Martin
      Harry Martin last edited by

      How do I multiple replacements like

      ui_manufacturer=abc
      ui_manufacturer=def
      ui_manufacturer=ghi
      …

      to

      ui_manufacturer=ABC
      ui_manufacturer=ABC
      ui_manufacturer=ABC
      …

      Scott Sumner 1 Reply Last reply Reply Quote 0
      • Scott Sumner
        Scott Sumner @Harry Martin last edited by

        @Harry-Martin

        Well, few replacement problems are “simple” because the people asking the questions tend to oversimplify what they want (probably because they really don’t know how to ask…), but if your case is really as simple as stated, then the following should do it:

        Find what zone: (?-is)ui_manufacturer=...
        Replace with zone: ui_manufacturer=ABC
        Search mode: Regular expression

        Any basic site on regular expressions should clarify the meaning of the syntax used above.

        1 Reply Last reply Reply Quote 0
        • Harry Martin
          Harry Martin last edited by

          Thank you. Unfortunately I get wrong results. Probably I oversimplified my problem.

          ui_manufacturer=aS 23 fs66-zz
          ui_manufacturer= de f
          ui_manufacturer=“xy”
          ui_manufacturer=g h i vy
          …

          to

          ui_manufacturer=ABC
          ui_manufacturer=ABC
          ui_manufacturer=ABC
          ui_manufacturer=ABC
          …

          So what I mean, everything after the equation mark “=” no matter what and how long, should be replaced by the same string. All in the same line.

          Scott Sumner 1 Reply Last reply Reply Quote 0
          • Scott Sumner
            Scott Sumner @Harry Martin last edited by

            @Harry-Martin

            Sure, I’ll do one more.

            Find what zone: (?-is)ui_manufacturer=.+

            Others settings are the same as the first try.

            1 Reply Last reply Reply Quote 1
            • Harry Martin
              Harry Martin last edited by

              Works! Thank you.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright © 2014 NodeBB Forums | Contributors