Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regular Expression to limit all letters less than 100 characters

Tags:

regex

I need the regular expression that would limit the number of characters to 100 and allow the use of 0-9, !@.,;:'"?- and all lower and upper case letters

like image 200
j00b Avatar asked May 20 '11 22:05

j00b


2 Answers

^(.{1,100})$

. This will allow all the characters numbers and special characters also {1,100} this the range you need to specific like min and max count

like image 68
Nitesh Avatar answered Sep 30 '22 03:09

Nitesh


/^[0-9A-Za-z!@.,;:'"?-]{1,100}\z/
like image 30
CanSpice Avatar answered Sep 30 '22 05:09

CanSpice