?
Solved

Regular expression validator of parenthesis on the client side

Posted on 2008-10-22
4
Medium Priority
?
392 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
Albert Van Halen earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

777 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