The reg-ex I have written covers all but the last one with the hyphens in
^([A-Za-z.\d].?[A-Za-z])(@[A-Za-z].[A-Za-z].?[A-Za-z]*)$ (this doesn’t look like Ui Path is showing this right so have included a screenshot)
The thinking being I’ve used ‘A-Z’ instead of \w to stop email addresses being picked up where somebody has put in incorrect symbols
Please can somebody see if they can alter the above so the last email address with the hyphens in is picked up? When I have added a ‘-’ to the first character set, this hasn’t worked.
Please can I ask if you know for this positive lookahead which looks for the an ‘a’ which is followed by an ‘r’, how I would modify this so it only picks out the first ‘a’ in car and none of the others?
You’ll have to be more specific. Do you want it to always get the first occurrence? If so just use the matches activity and use matches(0) or regex.match (which takes the first match only by default).
What happens if the word character is in there?
This is a character car car car
Do you want it to find the a in the word car or the a in character?