problems with apostrophies

  • 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.

  • @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.

  • Alan, you are my hero. Thank you!!

Log in to reply