I'm trying to insert a character into a string. Specifically, I'm trying to insert omitted apostrophes into contractions. I fear this is impossible with regex since I'm not actually matching anything—I'm matching the non-space between two characters.
The search I've been using is:
Code:
(?<=\b[Cc]an|\b[DdWw]on|\b[CcWw]ouldn|\b[Ss]houldn|[Dd]idn|\b[Ii]sn|\b[Aa]ren|\b[WwHh]asn)t\b
which matches the ending "t" that can then be replaced by "’t". But I'm hoping there's a way to write the search such that I'm functionally inserting the apostrophe rather than replacing the "t".