Since nobody seems to have answered :):
(?s) - see [Ovid]'s answer
^ - beginning of string
.{0,1100} - between 0 and 1100 characters
$ end of string
And other points below:
- yes you can use javascript, but cannot *rely* on it, so always add server side check
- $string = substr($string,0, 1100) is quick solution
- or trim and add ... if you want to show it was longer, using something like <CODE>$string =~ s/^(.{0,1096}) .*$/$1.../ if length($string)>=1100);
TIMTOWTFIU
cLive ;-)