Regular expressions with the RegularExpressionValidator

P

Paulo Reichert

I have a quite strange problem:

I have several regular expressions like this one: ^\w{1,50}$

If I use this regular expression in the following code:

Regex rx = new Regex(@"^\w{1,50}$");
Console.WriteLine(rx.IsMatch("Aéiou");

It returns true. If I use this same regular expression with the
RegularExpressionValidator, I can't insert accented characters and doesn't
allow the user to submit the form.

I would like to know which differences exists between the
RegularExpressionValidator and the Regex.

Any help is good. Thanks in advance.
Paulo
 

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

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top