• Login
Community
  • Login

Cannot select bold character in replace in files

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
8 Posts 3 Posters 116 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.
  • G
    Game Movies
    last edited by Apr 29, 2025, 5:34 AM

    Hi, so I have hundreds of html files (from epub) where there was 8b4d36b0-84b8-4a4a-8614-a9e5c0af6035-image.png written by mistake. I want to remove this from all the html files.

    I was able to replace the normal unnecessary texts from the documents.
    But for some reason, I cannot get any hits when I try to find and replace $1!

    I have tried all the search mode in Find in Files as well as tried to search <bold>$1!</bold>, but it didn’t work.
    in the page source of the html files, it shows: <strong>$1</strong>! for that. but even using this to search in notepad ++ didn’t work.

    Thank you in advance.

    T A 3 Replies Last reply Apr 29, 2025, 5:46 AM Reply Quote 0
    • T
      Terry R @Game Movies
      last edited by Terry R Apr 29, 2025, 5:46 AM Apr 29, 2025, 5:46 AM

      @Game-Movies

      Have you opened one of the html files in Notepad++ to look for this text? Not using the find function but visually looking for it.Possibly the actual code is different to what you think it is.

      Could you copy a few lines from a file containing this text and paste here?

      Terry

      G 1 Reply Last reply Apr 29, 2025, 5:50 AM Reply Quote 0
      • T
        Terry R @Game Movies
        last edited by Terry R Apr 29, 2025, 5:49 AM Apr 29, 2025, 5:48 AM

        @Game-Movies

        I had an inkling, and it seems to have paid off.

        In HTML, the dollar sign ($) is represented by the character entity &dollar; or the HTML code &#36;.

        Terry

        G 1 Reply Last reply Apr 29, 2025, 6:04 AM Reply Quote 0
        • G
          Game Movies @Terry R
          last edited by Game Movies Apr 29, 2025, 5:54 AM Apr 29, 2025, 5:50 AM

          @Terry-R b4f5d8a7-824d-45db-a4fd-617959f1bda2-image.png

          seems like I only removed the text of the hyperlink, but the link is still there. is there a way to remove the link as well? okay, I can select the <a xxxxxxxxxx > the hyperlink and replace it. but still cannot select the $1!

          T 1 Reply Last reply Apr 29, 2025, 6:03 AM Reply Quote 0
          • T
            Terry R @Game Movies
            last edited by Apr 29, 2025, 6:03 AM

            @Game-Movies

            I just did some testing as I’m not convinced on what you see in the image, especially since you say you had tried that but got no selections.

            As a suggestion, select in that file the <strong>......! string. Copy that to the Find function and click on “Count”. If it does indeed get a number other than 0 (it should get 1 at least) then use that across the rest of the files to remove the entries.

            Terry

            1 Reply Last reply Reply Quote 0
            • G
              Game Movies @Terry R
              last edited by Apr 29, 2025, 6:04 AM

              @Terry-R c9d9f9a4-208b-4a22-bcb3-8af54a2fd846-image.png I got this when I searched for it. even just searching $ gave no result.

              I solved it. I just selected match case with the <strong>xxx and it finally found it.

              Thank you.

              T 1 Reply Last reply Apr 29, 2025, 6:08 AM Reply Quote 0
              • T
                Terry R @Game Movies
                last edited by Terry R Apr 29, 2025, 6:18 AM Apr 29, 2025, 6:08 AM

                @Game-Movies said in Cannot select bold character in replace in files:

                I just selected match case with the <strong>xxx and it finally found it.

                Glad you have solved it. The options “Match Case” “Match whole word Only” and “Wrap Around” are very important. I usually leave them off and make sure the cursor is at the start of the file.

                Terry

                1 Reply Last reply Reply Quote 1
                • A
                  Alan Kilborn @Game Movies
                  last edited by Alan Kilborn Apr 29, 2025, 11:05 AM Apr 29, 2025, 11:05 AM

                  @Game-Movies:

                  This is indeed what your data looks like:

                  <strong>$1</strong>!

                  Your search screen capture shows that you are using Regular expression search mode. This isn’t going to allow you to match the $ as that is a special character.

                  You’d want:

                  <strong>\$1</strong>!


                  But if you remove that, wouldn’t you also want to remove the line (now empty) that it is on as well? And what about the <p> and </p> lines that wrap it?

                  I get the sense that you are just kind of hacking at this, and are likely to end up with a mess in the end.

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