Solved

Regular expression validator of parenthesis on the client side

Posted on 2008-10-22
4
388 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 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
pressing download button in c# 7 34
Asp.Net Session Question 2 33
ModalPopup  question 22 37
WPF Select Items 3 24
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
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 …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

735 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