I'm looking to validate the length of a textarea using a regular expression validator. It should allow all characters and crlfs. I'm also concerned about crlfs counting as 1 or 2 characters, I'm concerned it may be different across browsers but I'm hoping ASP.NET regulates it. Also, I'm saving to a mix of varchar and nvarchar fields in MSSQL, do I need to be concerned about the way crlfs are saved there? I'm in a hurry to do this right, so I'll be researching all this on my own but I'm just hoping someone out there might have experience handling such concerns.
+1
A:
Hi,
The following expression allows from 0 to 1000 chars.
[\w\n\r]{0,1000}
HTH, Stephan
Stephan
2010-06-11 07:44:59