I found a regEx online for matching a username, allowing spaces and such. But the regEx pattern has no limits on the character length of the string it should match. I want usernames to be between 3 and 15 characters. How can I modify this regular expression to apply this character length limitation on the username?
Code: Select all
^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$Kev