in reply to Parsing out first names
"..The initial is always 1 letter with our without a period..."
Will it always be uppercase? (lets assume yes)
So how about this (untested)...
# Non-greedy capture of everything from the start of the string, until + we see # A whitespace character # followed by a single upper-case letter # followed by an (optional) period # followed by the end of the string /^(.*?)\s[A-Z]\.?$/;
Cheers,
Darren :)
|
|---|