I need a JavaScript regular expression that meets the following rules:
- Have between 2 and 255 characters
- In lower case
- Only contain alphanumeric, underline (_), period (.) or hyphen (-).
I need a JavaScript regular expression that meets the following rules:
Try this to capture exact line:
/^[a-z0-9_\.-]{2,255}$/
Meets the rules:
The regex looks like this:
/^[a-z0-9_\.-]{2,255}$/