Where Can I Find Information About Format for Regular Expression as a Validator
So using what I could find (and with the help of this forum), I wrote a regular expression that forces a name entry to be Last, First and MI, (i.e. [a-zA-Z]{1,20}, [a-zA-Z]{1,20}[ ]{0,1}[a-zA-Z]{0,2}). This allows a Middle Initial or not depending if the person has one. Now I was asked if I could include a "-" in the last or first name. Is there somewhere that I can look to find variations of this "regular expression" as to what is allowed and what is not? Where I can include something like a "-" appearing anywhere in the name? I tried something like ['-'-z] and it appears to work in the "sample text" but fails when I try it on the actual project.
Basically where can I find some documentation on setting this this regular expression to valid different strings?
Accepted answer
e.g. [-a-zA-Z]
This has a few more methods