Regex

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am looking for a regular expressiion to validate multiline text box.

It should allow carraige returns and accepts white space also

Thanks
 
I am looking for a regular expressiion to validate multiline text box.

It should allow carraige returns and accepts white space also

But what do you want it to validate?

What's acceptable...?

What's not...?
 
Hello Bobby,
It should accept nmaximum 500 characters in multiline text box "Mark

$(?s:.){500}$

should do it.

though if you want to count a carriage return + linefeed as one or as zero
characters you'd need to adjust it a bit.

Remember that this won't ensure that the maximum number of bytes never exceeds
500, Unicode will mprobably stump you there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top