In the above, the first
* is a 'greedy match', meaning it
* Matches 0 or more of the preceeding token. This is a greedy match, and
will match as many characters as possible before satisfying the next
which would be where you have the
\\s\\ that represents a
So, I don't think you want the
* there if you want to prevent single characters using Regex. The same would apply to the
* you have following the second set of alpha characters.
It appears that you've also escaped an apostrophe with the
\'. Is that something you also don't want to allow? The
- following it isn't applicable in terms of a range of characters and thus would likely only apply when it follows an apostrophe; meaning Regex would look for
'-. I'm not totally certain of that, but I believe that would be the case.
* before the last closing parens would again be a 'greedy match` that due to it's placement I believe would cause the entire pattern search to repeat. From your description, I don't think that's what you desire.
I highly recommend you visit Regxr and use the on-line Regex expression builder there to create and test your expression. to ensure you're creating what you desire as its unclear to me from what you've posted. There's a quick YouTube tutorial on how to use the builder. There's even a library of RegEx patterns on the site available that users have submitted which are available for your use to help you create your own custom patterns if one doesn't already meet your needs.