in reply to Re: Re: Regex not matching &
in thread Regex not matching &

Eh, no. The problem is not clear. Any problem that considers matching "words" isn't clear unless there is a clear (sic) definition of what a word is. Your original code allows "words" to contain semi-colons, dashes and ampersands. Are you considering ;-; to be a word? Is father-in-law&mother-in-law one or two words? Etc, etc.

Once you have a clear definition of what you are going to consider words, writing a regex is likely to be easy.

Abigail