Regular expression to exclude special characters

Discussion in 'ASP .Net' started by RJN, Feb 25, 2005.

  1. RJN

    RJN Guest

    Hi

    I want to use regularexpression validator for a text box . I want the
    entered value to have only alphanumeric , space, underscrore and -

    In VB I used something like this. [^\sa-zA-Z0-9_-].
    Same doesn't seem to work in ASP.Net

    Any help please?

    Thanks

    Rjn



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    RJN, Feb 25, 2005
    #1
    1. Advertising

  2. RJN

    DLG Guest

    check out regxlib.com, they have lots of good info on regular expressions

    "RJN" <> wrote in message
    news:...
    >
    > Hi
    >
    > I want to use regularexpression validator for a text box . I want the
    > entered value to have only alphanumeric , space, underscrore and -
    >
    > In VB I used something like this. [^\sa-zA-Z0-9_-].
    > Same doesn't seem to work in ASP.Net
    >
    > Any help please?
    >
    > Thanks
    >
    > Rjn
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    DLG, Feb 25, 2005
    #2
    1. Advertising

  3. RJN

    Frank Guest

    See if http://www.regexlib.com/ has something useful (they have samples
    tested in .NET).

    -HTH


    "RJN" <> wrote in message
    news:...
    >
    > Hi
    >
    > I want to use regularexpression validator for a text box . I want the
    > entered value to have only alphanumeric , space, underscrore and -
    >
    > In VB I used something like this. [^\sa-zA-Z0-9_-].
    > Same doesn't seem to work in ASP.Net
    >
    > Any help please?
    >
    > Thanks
    >
    > Rjn
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Frank, Feb 25, 2005
    #3
    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. Brian Vallelunga
    Replies:
    2
    Views:
    8,343
    Brian Vallelunga
    Jul 31, 2003
  2. Replies:
    8
    Views:
    13,913
    John C. Bollinger
    Nov 10, 2005
  3. AAaron123
    Replies:
    0
    Views:
    631
    AAaron123
    Oct 3, 2008
  4. Marc Bogaard
    Replies:
    12
    Views:
    372
    Bart Lateur
    Oct 21, 2004
  5. Gabriela
    Replies:
    4
    Views:
    577
    Tim Greer
    Dec 22, 2008
Loading...

Share This Page