View Single Post
Old 06-13-2012, 11:45 AM   #1
ElMiko
Evangelist
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 480
Karma: 65460
Join Date: Jun 2011
Device: Kindle
\b matches accented characters

I was trying to catch instances where a blank space had been inserted in place of an apostrophe, rendering strings such as "John s " or "we ve " or "don t ", etc. So, I came up with:

Code:
\s(?=([st]|re|ve|ll)\b)
Which worked very nicely, as I replaced the highlighted blankspace with an apostrophe... until I realized that the "\b" was matching accented characters (eg. "a séance" or " töten").

Any ideas?
ElMiko is offline   Reply With Quote