ClulessChris
IS-IT--Management
I’m trying to count the number of personal titles in a body of text. Each title is prefixed with ‘Y00’. I use this regex pattern: (Y00)[A-z]*\s
This works well to match the prefix followed by Alpha characters until whitespace. And so will match:
Y00Mr Y00Miss Y00Prof
However it misses the match if, as is sometimes the case, the tile is followed by ‘.’
How can I amend the pattern to also match :
Y00Mr. Y00Miss. Y00Prof.
Thanks for your time.
Never knock on Death's door: ring the bell and run away! Death really hates that!
This works well to match the prefix followed by Alpha characters until whitespace. And so will match:
Y00Mr Y00Miss Y00Prof
However it misses the match if, as is sometimes the case, the tile is followed by ‘.’
How can I amend the pattern to also match :
Y00Mr. Y00Miss. Y00Prof.
Thanks for your time.
Never knock on Death's door: ring the bell and run away! Death really hates that!