boxhead — 2011-10-05T07:15:05-04:00 — #1
I need seperate regular expression to match the following:
All non special characters EXCEPT ' and - (match df&g but not ab-tg or df')
Any match from a list of strings e.g. "aka", "nee", "n/k" - either on their own or followed by a space (match "nee smith" or "aka jones" or "n/k" but not "Paneen" or "Pakah")
Two spaces in a row
Two hypens in a row
parkint — 2011-10-05T08:36:36-04:00 — #2
The "list of strings" is handled with an OR operation (using the Pipe symbol)
You can match all 'non special' characters with this:
I believe your requirement will be met with this:
boxhead — 2011-10-05T10:48:09-04:00 — #3
The first will match 'McNe'e won't it? I don't want this, the string must be on it's own or followed by a space.
The second matches any no digit or non-space! I want to match any special characters EXCEPT ' and - such as [\\W^\\s^\\'^\\-] - this doesn't work!