GREP for 1st, 2nd, 3rd, 4th
Hello all,
I'm not so hot with GREP, but I love using it for formating text when I can.
I'd like to apply small caps to "st, nd, rd and th" when used in 1st, 2nd, 3rd, 4th, etc., but I'm having trouble limiting where it is applied. I've tried some positive look behind and look ahead rules, but I'm still failing.
I'm using the GREP below:
(?<=\d)th|nd|rd|st(?=.+?)
Using it for addressing like below:
151 West 34th Street
27th Fl.
Long Island City, NY 11101
I don't want the "st" in West or the "nd" in Island small affected, but haven't figured out how to control that. Any suggestions greatly appreciated.
Thanks,
Dennis
