Reputation: 3548
I'm using pcre regular expressions and I'm trying to clean up a list names for a mailing.
I'm trying to validate and enforce the following rules:
I've included some examples here: Example Name Strings
1. J. Doe
2. J Doe
3. J. Doe
4. J Doe
5. J. Doe
The first string meets all the criteria, but all other do not meet the criteria for one reason (no period, extra spaces, etc.) or another.
Is it possible for a regular expression to take these five name string and for it to return 5 identical valid name string like number 1.
I tried using a conditional regular expression,but found that to be a dead end.
Upvotes: 1
Views: 46