Community
    • Login

    Very Simple Replace Problem - but Newbie

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 1.8k Views 2 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.
    • Harry MartinH Offline
      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 SumnerS 1 Reply Last reply Reply Quote 0
      • Scott SumnerS Offline
        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 MartinH Offline
          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 SumnerS 1 Reply Last reply Reply Quote 0
          • Scott SumnerS Offline
            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 MartinH Offline
              Harry Martin
              last edited by

              Works! Thank you.

              1 Reply Last reply Reply Quote 0

              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