Regular expressions with the RegularExpressionValidator

Discussion in 'ASP .Net Web Controls' started by Paulo Reichert, Oct 21, 2003.

  1. 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
     
    Paulo Reichert, Oct 21, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jay Douglas

    Custom Regular Expressions in ASP.net

    Jay Douglas, Nov 2, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    618
    mikeb
    Nov 3, 2003
  2. mark

    Regular expressions

    mark, Jun 30, 2003, in forum: Perl
    Replies:
    4
    Views:
    1,736
  3. BH
    Replies:
    0
    Views:
    561
  4. Jay Douglas
    Replies:
    0
    Views:
    643
    Jay Douglas
    Aug 15, 2003
  5. Noman Shapiro
    Replies:
    0
    Views:
    260
    Noman Shapiro
    Jul 17, 2013
Loading...

Share This Page