I am using a shortcut to extract personal details from a phot. I have extacted out the line with their name, and it is in the format such as:
SMITH, MS JENNY ANGELA
I am trying to use the MATCH command to get the firstname and have
as i thought that you could use brackets in a RegExp to return part of the results of the expression, but when I look at the match results I will get
(with the comma)
The reson I am using .+ to match is I want to handle names such as O’HARA and FANCY-SURNAME as well as more typical single word surnames.
Is there an easier way that I am just overlooking? I can’t really find a lot of detailed explanation or examples for this when I actually want to return more than one piece of data from a single match statement.
You are matching. Groups (sets in parentheses) are for substitutions. I think you would always have to use a two step process if you are relying on the comma for a match to then remove the comma with a subsequent step.