lundi 29 juin 2015

Regex to find Last name, first name or just first name

trying to write a regex that will extract a first and last name or just a first name depending on the format.

The two possible formats will be:

<Last name> / <first name>


<first name>

Is there a single regular expression that I can use to extract (with groups) the last name and first name if in the first format, or just the first name in the second format?

Thanks! Kyle

Aucun commentaire:

Enregistrer un commentaire