473,395 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Regular expression to exclude special characters

RJN

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!
Nov 19 '05 #1
2 12618
DLG
check out regxlib.com, they have lots of good info on regular expressions

"RJN" <rj*@yahoo.com> wrote in message
news:ef**************@TK2MSFTNGP12.phx.gbl...

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!

Nov 19 '05 #2
See if http://www.regexlib.com/ has something useful (they have samples
tested in .NET).

-HTH
"RJN" <rj*@yahoo.com> wrote in message
news:ef**************@TK2MSFTNGP12.phx.gbl...

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!

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kenneth McDonald | last post by:
I'm working on the 0.8 release of my 'rex' module, and would appreciate feedback, suggestions, and criticism as I work towards finalizing the API and feature sets. rex is a module intended to make...
3
by: Gopinath | last post by:
Hi JavaScript Gurus, I've a question on Regular Expressions using RegExp object. I just want to know whether it is possible to do the search (see below) using RegExp. Any pointers would be of...
7
by: hungrymind | last post by:
Hi all, I am developing some control (textbox based), to validate inputs to that control I am using regular expression, where pattern is generated dynamically. I need to identify what all...
2
by: Jim Heavey | last post by:
Hello, I have an file that I am reading and it has some goffy characters in it and I want to use a regular expression to clean up those characters. I am not sure how to construct a regular...
2
by: Dan Schumm | last post by:
I'm relatively new to regular expressions and was looking for some help on a problem that I need to solve. Basically, given an HTML string, I need to highlight certain words within the text of the...
6
by: dotnetprogram | last post by:
Does anybody have a regular expression to be used in the validation controls of asp.net that checks if the text inputted is: 1) alphanumeric and doesn't include special characters and symbols...
1
by: Jim Heavey | last post by:
I created a regular expression and I used the following regular expression: {1,1000} I used \091 and \093 to indicate that "" are valid characters, but it seems to ignore those values as it will...
5
by: John | last post by:
I am new in Regular Expression. Could someone please help me in following expression? 1. the string cannot be empty 2. the string can only contains AlphaNumeric characters. No space or any...
18
by: Lit | last post by:
Hi, I am looking for a Regular expression for a password for my RegExp ValidationControl Requirements are, At least 8 characters long. At least one digit At least one upper case character
0
by: AAaron123 | last post by:
Been playing with asp:changepassword and have it looking OK except that I can't elininate or change the title at the top that says "Change Your Password". It's a repeat of my pages title. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.