Community

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

    problems with apostrophies

    Help wanted · · · – – – · · ·
    2
    3
    242
    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.
    • James Long
      James Long last edited by

      Hello!
      I’m trying to perform a find and replace to swap about 40,000 instances of “Organization’s Name” (minus quotation marks) with a generic moniker in several thousand HTMs. For the life of me, Notepad++ will not find any instances of Organization’s Name. When I remove the apostrophe, the find feature works flawlessly.

      When I search ONLY for “Organization” within Notepad++, I see a lot of the instances I’m looking for, and the possessive version of Organization shows up as:
      Organization�s (this is a direct copy and paste from Notepad++, however in the notepad++ UI, the wonky ASCII character is an empty box)

      How can I fix this? I’ve opened these HTMs in Notepad, and the plaintext is exactly as you’d expect it: Organization’s Name

      Any help would be greatly appreciated.

      Alan Kilborn 1 Reply Last reply Reply Quote 0
      • Alan Kilborn
        Alan Kilborn @James Long last edited by Alan Kilborn

        @James-Long said in problems with apostrophies:

        the wonky ASCII character

        The problem is that the apostrophe is not ASCII; in fact ASCII is a dying notion. The “in thing” is now Unicode, and that’s what you’ve got, and probably UTF-8.

        Without diving in too far and looking up the peculiarities of that specific “character”, a replacement like this might work:

        Find what box: Organization(.)s Name
        Replace with box: Generic Moniker\1s Name
        Match case checkbox: ticked
        Wrap around checkbox: ticked
        Search mode radiobutton: Regular expression <---- this is the KEY part
        Press the Replace All button

        Of course, that assumes you want to keep the “wonky” character. If you don’t, what I’ve provided for the Find what box will probably at least get you finding what you need; replace with whatever you want.

        Looking up the exact character would be more precise. Maybe try selecting your search term and then pressing Ctrl+f – this should copy what is selected directly into the Find what box.

        1 Reply Last reply Reply Quote 5
        • James Long
          James Long last edited by

          Alan, you are my hero. Thank you!!

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