Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Regular expression to exclude special characters

Reply
Thread Tools

Regular expression to exclude special characters

 
 
RJN
Guest
Posts: n/a
 
      02-25-2005

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!
 
Reply With Quote
 
 
 
 
DLG
Guest
Posts: n/a
 
      02-25-2005
check out regxlib.com, they have lots of good info on regular expressions

"RJN" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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!



 
Reply With Quote
 
 
 
 
Frank
Guest
Posts: n/a
 
      02-25-2005
See if http://www.regexlib.com/ has something useful (they have samples
tested in .NET).

-HTH


"RJN" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RegExp pattern to escape ALL special characters (but exclude unicodechars) Gabriela Javascript 4 12-22-2008 06:04 PM
Need regular expression for at least 7 characters and at least 1 special chatacter AAaron123 ASP .Net 0 10-03-2008 01:25 PM
Regular expression question -- exclude substring dreamerbin@gmail.com Java 8 11-10-2005 12:30 PM
Regular Expression for HTML Tags and Special Characters Marc Bogaard Perl Misc 12 10-21-2004 07:11 PM
Re: howto use c# regular expression validator to exclude file types Brian Vallelunga ASP .Net 2 07-31-2003 10:27 PM



Advertisments