Sometimes there is a space at the end of the first name and/or last name and the action then fails.
I looked up filtering white space and used = [ \t]+$ to no avail.
Appreciate any help
if we could maybe be prepared for a space at the end of the last name and/or at the end of the first name, so that it works whether the space is there or not. - possible? - Thanx
I tried the following to no avail. It did not remove any spaces.
In addition, if that worked it would not take care of the internal space after the last name,
Expand
Campbell , Colleen
it only addresses 'line ending' white spaces. Correct?
This worked for removing the space before the comma, which is the immediate issue. I hear what you are saying though, to not fix just one issue but be able to resolve a number of issues as they appear.
As always, grateful for your help.
\s* is generally better than \s? for this kind of thing. * means zero or more, ? means 0 or 1.
Note that \s includes line endings, so you need to be slightly careful when using it. \h matches only horizontal white space, but is not supported until 10.11+, so if you happen to be using 10.10 or earlier, that will not work.