Solved

Regular expression validator of parenthesis on the client side

Posted on 2008-10-22
4
377 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
Comment Utility
Use this \([A-Za-z]+\)
0
 

Author Comment

by:Kerau
Comment Utility
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
Comment Utility
Thanks!!
0
 
LVL 19

Expert Comment

by:Albert Van Halen
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 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