Community
    • Login

    Multiple search terms replaced with multiple terms

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    17 Posts 4 Posters 6.7k 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.
    • Alan PredaA
      Alan Preda
      last edited by

      Again thank you for responding! I’ve figured it out.

      Your suggestion to remove the pipes in the Replace With field was good. By itself it did not work. First convert the ANSI file to UTF-8, then apply the RegEx Replace without pipes in the Replace field, making sure the Match Case box is checked, was what made it work. Thank you anyway. Your suggestion helped.

      My eyes may not be as good as yours. I looked as both Before and After captures with the Windows Magnifier at 300%. I could not find any difference. I’m posting below a link to a screen capture of your post. Can you please help me discover the differences between the two pictures, by highlighting them in red?

      link text

      Thank you much!

      1 Reply Last reply Reply Quote 0
      • Alan PredaA
        Alan Preda
        last edited by

        @Scott-Summer

        “My computer yells at me” meant it emitted the error Windows sound. It did not cross my mind it will be so difficult to translate that into IT language (I am IT). My appologies!

        Scott SumnerS 1 Reply Last reply Reply Quote 0
        • Scott SumnerS
          Scott Sumner @Alan Preda
          last edited by

          @Alan-Preda

          No problem. Maybe it is me, but it absolutely didn’t cross my mind to equate “yells at me” to the “system error bell”. I use my PC with sound muted; maybe that’s why…

          1 Reply Last reply Reply Quote 0
          • Alan PredaA
            Alan Preda
            last edited by

            @Claudia Frank
            I realized why it worked for you by only removing the pipes in the Remove field, but it did not for me. You copied my example (Aºteaptã, lasã-mã să chem întãriri!) and pasted it into a new NPP document. By default, NPP is setup to make any new document into a UTF-8 document (to include correct representation of all characters, in all languages). In my case, as mentioned in my first message, I opened an ANSI file in NPP and applied the RegEx Replace strings to it. My file was an existing document, not a new document, so NPP did not automatically change it to UTF-8. I had to convert it first, from the Encoding menu, and then it worked. As I said, your original suggestion did help though, so I am grateful.

            @Scott Sumner said:
            “No, clearly the images are different. Please examine things carefully before replying.”

            I’ve also realized the phrase quoted above came from you, not Claudia. I’m still unable to find the differences between the Before and After pictures. I’ve posted a link to a screen capture of Claudia’s post with the two images. Maybe YOU can help me find what’s different between them, by highlighting it in red. Thank you in advance.

            Claudia FrankC 1 Reply Last reply Reply Quote 0
            • guy038G
              guy038
              last edited by guy038

              Hello, Alan,

              Indeed, the two Claudia’s pictures are different ! Just look, carefully, the line 3, six characters have changed, in the sentence, accordingly to your regex search/replacement :-))

              In the line 3, of the pictures, as expected :

              • Character º is changed into the character ș, at position 2

              • Character ã is changed into the character ă , at positions 8, 14, 17, 20 and 30

              Best regards,

              guy038

              1 Reply Last reply Reply Quote 0
              • Claudia FrankC
                Claudia Frank @Alan Preda
                last edited by Claudia Frank

                @Alan-Preda

                sorry for being late, answered the question just before I went to work.
                As Scott and guy038 already said, the images are different.
                In regards to the problem you discovered, of course, it must be made sure that
                text which needs to be converted are in the expected format. As I was copying from html page
                it most likely was encoded in utf-8.
                But if you have a valid ANSI text and the replace chars are as well ANSI compatible, it should have been worked.

                Cheers
                Claudia

                1 Reply Last reply Reply Quote 0
                • Alan PredaA
                  Alan Preda
                  last edited by

                  Wow! Thank you guy038!!!
                  I was looking for changes in the Replace strings, while Claudia was pointing to the changes MADE by applying the RegEx Replace function (at the top of the image). That is, I was thinking Claudia posted the before and after to show me how to correct my replace strings, while she actually posted them to show me the Replace string without pipes does work!

                  Many thanks again to both of you! You two guys are making a great support team on this forum!

                  Claudia FrankC 1 Reply Last reply Reply Quote 0
                  • Claudia FrankC
                    Claudia Frank @Scott Sumner
                    last edited by

                    @Scott-Sumner

                    Hi Scott,

                    thx for the kind words or … ?? ;-)
                    I’ve asked leo.org what saintly means and it tells me that
                    I’m either holy Mary or behave like a sheep. :-D

                    I take the sheep if you don’t mind!

                    Cheers
                    Claudia

                    1 Reply Last reply Reply Quote 1
                    • Claudia FrankC
                      Claudia Frank @Alan Preda
                      last edited by

                      @Alan-Preda

                      Many thanks again to both of you! You two guys are making a great support team on this forum!

                      If I would have the same patience that guy038 has, I would have written a book ;-)
                      about what I’ve done but as I’m lazy and just found out that my linux screenshot tool
                      can upload images automatically I prefer this way because a picture says more the words.
                      Well, mostly ;-)

                      Cheers
                      Claudia

                      1 Reply Last reply Reply Quote 0
                      • Alan PredaA
                        Alan Preda
                        last edited by

                        @Claudia Frank
                        Thank you Claudia for the added details to your initial answer. As I mentioned, you copying my example from the html page and pasting it into a new document in NPP made it work for you. Because of this default setting, shown in the capture found following the link below:

                        link text

                        Many thanks, again and again! :)

                        Claudia FrankC 1 Reply Last reply Reply Quote 0
                        • Claudia FrankC
                          Claudia Frank @Alan Preda
                          last edited by

                          @Alan-Preda

                          Alan, your welcome.
                          You are right, this setting is set because I only work with utf-8 at all.
                          Just to be sure, your question has been answered or is there something left?

                          Cheers
                          Claudia

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