REG EXPRESSION

  • Thread starter Thread starter Ken
  • Start date Start date
Strange enough, it wasn't working .
It seems working with "\w{0,50}" now.

if you need to validate a text in the TextBox control then you can
simply use the maxlength property
 
well,
I used RegularExpressionValidator within EditItemTemplate in the formview.
when I tried to update without changing the value for the
"ControlToValidate" for that RegularExpressionValidator, it shows the
errorMessage even though this is valid.


Ken said:
Strange enough, it wasn't working .
It seems working with "\w{0,50}" now.

Thanks.



Alexey Smirnov said:
How can I insert into validationExpression for "any word within 50 any
character long"?

.{50}

more info
here:http://msdn2.microsoft.com/en-us/library/ae5bf541(VS.80).aspx

if space is not allowed then use

\w{50}

it would match any word character including underscore [A-Za-z0-9_]
 
well,
I used RegularExpressionValidator within EditItemTemplate in the formview.
when I tried to update without changing the value for the
"ControlToValidate" for that RegularExpressionValidator, it shows the
errorMessage even though this is valid.

Do you mean that "\w{0,50}" is not working, or what?
 
Back
Top