Hi,
Could somebody tell me how to write a regular expression that covers the following rules for a user name:
Must be 5 to 15 characters in length, and may only contain letters, underscores and hyphens.
I would need this for Javascript and for PHP, so if they use a different pattern, please could you show me both.
I have tried, truly I have. I've got bits working, but never the whole. Regular expressions and me were clearly never destined to cohabit the same point in time and space in any meaningful way!
Many thanks in advance.