I am trying to allow users to register a username that contains only alphabet letters (of any language), numbers, or hyphens in it. I'm trying to check if a username breaks this rule.
So far this is working to find out if a username does not contain only alphanumeric characters:
REFindNoCase('^[[:alnum:]]', ARGUMENTS.Username)
Which is fine because if I get back a found result then I know its an invalid username format with special characters in it. But I also want to allow hyphens through. How could I express in regex like (pseudo-code follows):
REFindNoCase('^[[:alnum:]\-]', ARGUMENTS.Username)
I can only use Perl compatible Regex because I am using ColdFusion which uses that standard mostly.