Thread: Regex examples
View Single Post
Old 01-02-2015, 02:36 PM   #447
Steadyhands
Connoisseur
Steadyhands began at the beginning.
 
Steadyhands's Avatar
 
Posts: 57
Karma: 10
Join Date: Dec 2011
Device: Samsung Tablet
Quote:
Originally Posted by eschwartz View Post
Code:
(?<=\p{Ll})\s?‘s(?=\p{P}|\s)
Mainly, just make the space optional which cuts the regex in half. You can also remove some of the groupings you used.
Thanks,

Changing it a little more I've started looking for things other than the s, allowing for uppercase and full stops.
Code:
(?<=\p{Ll}|\p{Lu}|\.)\s?‘(d|m|s|t|ll|re|ve)(?=\p{P}|\s)
Steadyhands is offline   Reply With Quote