regex: trim all strings directly preceeded by digit except if string belongs to predefined set of st
- by Geert-Jan
I've got addresses I need to clean up for matching purposes.
Part of the process is trimming unwanted suffices from housenumbers, e.g:
mainstreet 4a --> mainstreet 4.
However I don't want:
618 5th Ave SW --> 618 5 Ave SW
in other words there are some strings (for now: st, nd, rd, th) which I don't want to strip.
What would be the…