A regular expression to limit the length of characters (between x and y characters long).
/^(.|\n){0,18}$/
Matches:
- 0
- abc
- 123456789012345678
Non-matches:
- 1234567890123456789
- abcdefghijklmnopqrs
A regular expression to limit the length of characters (between x and y characters long).
/^(.|\n){0,18}$/