Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regular Expression to limit characters to 5000

I need a regular expression to simply limit the number of characters in a textarea to 5000. If there are more secure regular expressions I could use, I am open to suggestions.

Thanks

like image 930
user671460 Avatar asked Nov 28 '25 09:11

user671460


1 Answers

^.{0,5000}$ should work. Although using a regular expression for this is probably an odd choice.

like image 189
Wooble Avatar answered Nov 29 '25 22:11

Wooble