.NETGURU
RegExp
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngregexp' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Sathish
Hi All,

I need to validated a textbox using the regularexpressionvalidtor in asp.net, following are the valid allowed
characters (a-z, A-Z, 0-9, single quotes, brackets, + , ampersand and space). Can anyone suggest a RegExp code to validate the above requirement.

Regards,
Sathish
Reply to this message...
 
    
Steven A Smith (VIP)
Sounds really close to http://regexlib.com/REDetails.aspx?regexp_id=31
also do a search for "password" at
http://regexlib.com/

Steve

Steven Smith
Click here to reveal e-mail address
President, ASPAlliance.com
http://aspalliance.com The #1 ASP.NET Community
http://aspsmith.com ASP.NET Training for ASP Developers

Learning ASP.NET? Get My Book: ASP.NET By Example
http://www.amazon.com/exec/obidos/ASIN/0789725622/stevenatorasp/
----- Original Message -----
From: Sathish
To: aspngregexp
Sent: Friday, January 11, 2002 1:38 PM
Subject: [aspngregexp] RegExp

Hi All,

I need to validated a textbox using the regularexpressionvalidtor in asp.net, following are the valid allowed
characters (a-z, A-Z, 0-9, single quotes, brackets, + , ampersand and space). Can anyone suggest a RegExp code to validate the above requirement.

Regards,
Sathish
| [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
    
Prasad, G. Lukas
Hi Satish,

I beleive the following code would work

^[\w,{,},(,),\[,\],&,+,\']+$

Try this out and let me know if this has got any problems

Regards,
Prasad. G.L.
-----Original Message-----
From: Sathish [mailto:Click here to reveal e-mail address]
Sent: Saturday, January 12, 2002 12:09 AM
To: aspngregexp
Subject: [aspngregexp] RegExp

Hi All,

I need to validated a textbox using the regularexpressionvalidtor
in asp.net, following are the valid allowed
characters (a-z, A-Z, 0-9, single quotes, brackets, + , ampersand and
space). Can anyone suggest a RegExp code to validate the above requirement.

Regards,
Sathish
| [aspngregexp] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
    
Mark Bruce
try
([a-zA-Z0-9'\[\]+& ])*

Sathish <Click here to reveal e-mail address> wrote: Hi All, I need to validated a textbox using the regularexpressionvalidtor in asp.net, following are the valid allowed
characters (a-z, A-Z, 0-9, single quotes, brackets, + , ampersand and space). Can anyone suggest a RegExp code to validate the above requirement.
Regards,Sathish| [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives

---------------------------------
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail.
Reply to this message...
 
    
Sathish
Hi Prasad,
I am currently using the following /[^a-zA-Z0-9'&() ]/ to validate my code, this works fine with ordinary HTML textbox, only when I try assign it to regularexpressionvalidator in asp.net and try to validate it for a textbox in datagrid it throws invalid chars, invariable of what value I pass.

Valid allowed chars being the following and they can be in any order and n number of occurance (no commas)
a-z
A-Z
0-9
single quotes
brackets
Plus sign
Dash
ampersand
space

Regards,
Sathish
----- Original Message -----
From: Prasad, G. Lukas
To: aspngregexp
Sent: Thursday, January 10, 2002 10:31 PM
Subject: [aspngregexp] RE: RegExp

Hi Satish,

I beleive the following code would work

^[\w,{,},(,),\[,\],&,+,\']+$

Try this out and let me know if this has got any problems

Regards,
Prasad. G.L.
-----Original Message-----
From: Sathish [mailto:Click here to reveal e-mail address]
Sent: Saturday, January 12, 2002 12:09 AM
To: aspngregexp
Subject: [aspngregexp] RegExp

Hi All,

I need to validated a textbox using the regularexpressionvalidtor in asp.net, following are the valid allowed
characters (a-z, A-Z, 0-9, single quotes, brackets, + , ampersand and space). Can anyone suggest a RegExp code to validate the above requirement.

Regards,
Sathish
| [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives
| [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
    
Steven A Smith (VIP)
You're leaving out the / / prefix/suffix when you put it into your ValidationExpression right?

Steve

----- Original Message -----
From: Sathish
To: aspngregexp
Sent: Friday, January 11, 2002 3:19 PM
Subject: [aspngregexp] RE: RegExp

Hi Prasad,
I am currently using the following /[^a-zA-Z0-9'&() ]/ to validate my code, this works fine with ordinary HTML textbox, only when I try assign it to regularexpressionvalidator in asp.net and try to validate it for a textbox in datagrid it throws invalid chars, invariable of what value I pass.

Valid allowed chars being the following and they can be in any order and n number of occurance (no commas)
a-z
A-Z
0-9
single quotes
brackets
Plus sign
Dash
ampersand
space

Regards,
Sathish
----- Original Message -----
From: Prasad, G. Lukas
To: aspngregexp
Sent: Thursday, January 10, 2002 10:31 PM
Subject: [aspngregexp] RE: RegExp

Hi Satish,

I beleive the following code would work

^[\w,{,},(,),\[,\],&,+,\']+$

Try this out and let me know if this has got any problems

Regards,
Prasad. G.L.
-----Original Message-----
From: Sathish [mailto:Click here to reveal e-mail address]
Sent: Saturday, January 12, 2002 12:09 AM
To: aspngregexp
Subject: [aspngregexp] RegExp

Hi All,

I need to validated a textbox using the regularexpressionvalidtor in asp.net, following are the valid allowed
characters (a-z, A-Z, 0-9, single quotes, brackets, + , ampersand and space). Can anyone suggest a RegExp code to validate the above requirement.

Regards,
Sathish
| [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives
| [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives
| [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
    
Mark Bruce
try this
^[a-zA-Z0-9\[\]+&' ]+$
hope this helps!
Sathish <Click here to reveal e-mail address> wrote: Hi Prasad, I am currently using the following /[^a-zA-Z0-9'&() ]/ to validate my code, this works fine with ordinary HTML textbox, only when I try assign it to regularexpressionvalidator in asp.net and try to validate it for a textbox in datagrid it throws invalid chars, invariable of what value I pass. Valid allowed chars being the following and they can be in any order and n number of occurance (no commas)a-z A-Z 0-9single quotesbracketsPlus signDashampersand space Regards,Sathish----- Original Message ----- From: Prasad, G. Lukas To: aspngregexp Sent: Thursday, January 10, 2002 10:31 PMSubject: [aspngregexp] RE: RegExp
Hi Satish, I beleive the following code would work ^[\w,{,},(,),\[,\],&,+,\']+$ Try this out and let me know if this has got any problems Regards,Prasad. G.L.-----Original Message-----
From: Sathish [mailto:Click here to reveal e-mail address]
Sent: Saturday, January 12, 2002 12:09 AM
To: aspngregexp
Subject: [aspngregexp] RegExp

Hi All, I need to validated a textbox using the regularexpressionvalidtor in asp.net, following are the valid allowed
characters (a-z, A-Z, 0-9, single quotes, brackets, + , ampersand and space). Can anyone suggest a RegExp code to validate the above requirement.
Regards,Sathish| [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives | [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives | [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives

---------------------------------
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail.
Reply to this message...
 
    
Mark Bruce
Have you guys tried my last reply?
it worked for me
Mark
Steven A Smith <Click here to reveal e-mail address> wrote: You're leaving out the / / prefix/suffix when you put it into your ValidationExpression right? Steve ----- Original Message ----- From: Sathish To: aspngregexp Sent: Friday, January 11, 2002 3:19 PMSubject: [aspngregexp] RE: RegExp
Hi Prasad, I am currently using the following /[^a-zA-Z0-9'&() ]/ to validate my code, this works fine with ordinary HTML textbox, only when I try assign it to regularexpressionvalidator in asp.net and try to validate it for a textbox in datagrid it throws invalid chars, invariable of what value I pass. Valid allowed chars being the following and they can be in any order and n number of occurance (no commas)a-z A-Z 0-9single quotesbracketsPlus signDashampersand space Regards,Sathish----- Original Message ----- From: Prasad, G. Lukas To: aspngregexp Sent: Thursday, January 10, 2002 10:31 PMSubject: [aspngregexp] RE: RegExp
Hi Satish, I beleive the following code would work ^[\w,{,},(,),\[,\],&,+,\']+$ Try this out and let me know if this has got any problems Regards,Prasad. G.L.-----Original Message-----
From: Sathish [mailto:Click here to reveal e-mail address]
Sent: Saturday, January 12, 2002 12:09 AM
To: aspngregexp
Subject: [aspngregexp] RegExp

Hi All, I need to validated a textbox using the regularexpressionvalidtor in asp.net, following are the valid allowed
characters (a-z, A-Z, 0-9, single quotes, brackets, + , ampersand and space). Can anyone suggest a RegExp code to validate the above requirement.
Regards,Sathish| [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives | [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives | [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives | [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives

---------------------------------
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail.
Reply to this message...
 
    
Mark Bruce
Have you guys tried my last reply?
it worked for me
Mark
Steven A Smith <Click here to reveal e-mail address> wrote: You're leaving out the / / prefix/suffix when you put it into your ValidationExpression right? Steve ----- Original Message ----- From: Sathish To: aspngregexp Sent: Friday, January 11, 2002 3:19 PMSubject: [aspngregexp] RE: RegExp
Hi Prasad, I am currently using the following /[^a-zA-Z0-9'&() ]/ to validate my code, this works fine with ordinary HTML textbox, only when I try assign it to regularexpressionvalidator in asp.net and try to validate it for a textbox in datagrid it throws invalid chars, invariable of what value I pass. Valid allowed chars being the following and they can be in any order and n number of occurance (no commas)a-z A-Z 0-9single quotesbracketsPlus signDashampersand space Regards,Sathish----- Original Message ----- From: Prasad, G. Lukas To: aspngregexp Sent: Thursday, January 10, 2002 10:31 PMSubject: [aspngregexp] RE: RegExp
Hi Satish, I beleive the following code would work ^[\w,{,},(,),\[,\],&,+,\']+$ Try this out and let me know if this has got any problems Regards,Prasad. G.L.-----Original Message-----
From: Sathish [mailto:Click here to reveal e-mail address]
Sent: Saturday, January 12, 2002 12:09 AM
To: aspngregexp
Subject: [aspngregexp] RegExp

Hi All, I need to validated a textbox using the regularexpressionvalidtor in asp.net, following are the valid allowed
characters (a-z, A-Z, 0-9, single quotes, brackets, + , ampersand and space). Can anyone suggest a RegExp code to validate the above requirement.
Regards,Sathish| [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives | [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives | [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives | [aspngregexp] member Click here to reveal e-mail address = YOUR ID | http://www.asplists.com/asplists/aspngregexp.asp = JOIN/QUIT | http://www.asplists.com/search = SEARCH Archives

---------------------------------
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail.
Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification