Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Regular Expresion Validator

Posted on 2006-05-30
4
Medium Priority
?
498 Views
Last Modified: 2010-05-18
I'm trying to validate a text control in the following format :

(@String

This means that the user has to write in the textbox (@ plus any string he wants upto 50 characters.
My first try was this :  [(@_a-zA-Z_0-9_ _áéíóúñÑ]{3,50} but didn't works.
Any help will be appreciate it.
0
Comment
Question by:NeGueSa
  • 2
4 Comments
 

Author Comment

by:NeGueSa
ID: 16793915
I allready found out which expression to use is:

^[(]+[@]+[A-Z_a-z]{1,50}
0
 
LVL 2

Accepted Solution

by:
mbip2000 earned 2000 total points
ID: 16795849
Hi,

U r right.

But when u pass alphanumeric like the followings:

(@34543ewrewrew  No Matches [0]

(@ewrewrew34543  Matches [(@ewrewrew]

-------------------------------------------------------

^[(]+[@]+[\w*]{1,50}                    allow alphanumeric



0
 
LVL 3

Expert Comment

by:MrHorizontal
ID: 16797381
mbip: that allows all characters: ^[(]+[@]+[A-Z_a-z_0-9]{1,50}
0
 
LVL 2

Expert Comment

by:mbip2000
ID: 16797398
hi,
wht  u want? only text or numeric depends on u.
mbip
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
How do you create a user-centered user experience on your website? And what are some things you should consider in the process?
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Suggested Courses
Course of the Month10 days, 7 hours left to enroll

571 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