Solved

Regular expression validator of parenthesis on the client side

Posted on 2008-10-22
4
387 Views
Last Modified: 2012-08-14
I have a text box, where i want to add a parenthesis validator on the client side. Suppose user feeds in a value a-z or A-Z on the text box. It will prompt the user to put the value in parenthesis and if he adds parenthesis, the value is being accepted as is..Please suggest
0
Comment
Question by:Kerau
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
Albert Van Halen earned 500 total points
ID: 22781543
Use this \([A-Za-z]+\)
0
 

Author Comment

by:Kerau
ID: 22785163
Through some research i got this..can u explain ..the functionality of the following expression if it doesn't bother you much. I am thinking of best possible scenario..

Thanks


"[0-9A-Za-z\.\*\&\(\)\-\'\/\&\,\%\s]{1,100}"
0
 

Author Closing Comment

by:Kerau
ID: 31508925
Thanks!!
0
 
LVL 19

Expert Comment

by:Albert Van Halen
ID: 22786989
In this case it will accept alpha numeric characters (0-9A-Za-z)
Any character which is escaped (with the trailing \) it also accepts white-space characters (\s).
All that with a minimum length of 1 and a maxiumum length of 100.

But according to your question, me earlier post is a good answer.

I'm not realy a regex expert though.
Perhaps it's best to post this in the Regular Expression section ??
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now