This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Regular expression for allowing space, . , @ ,_ and , - Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Regular expression for allowing space, . , @ ,_ and , - " Watch "Regular expression for allowing space, . , @ ,_ and , - " New topic
Author

Regular expression for allowing space, . , @ ,_ and , -

Pramod Krishna Murthy
Ranch Hand

Joined: Jun 30, 2009
Posts: 37

hi all,
i need a regular expression to validate a text field which allows alphabets,numerals and special characters(@,&, . , _, space, -) . can anyone help please


"Nothing is forever except Change"
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

It sounds like you want \w (word) characters plus a few others. What do you have so far? Do you have a regular expression for just numbers maybe? Show where you get stuck so someone can help from that point rather than writing the whole thing for you.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
 
subject: Regular expression for allowing space, . , @ ,_ and , -
 
Similar Threads
Need help on Unique Javascript validation
How to check whether name of the File is in a Specifi format??
Alphabets only valitation
Doubt on Regular Expression
How can I add error handling facilities to this code?