This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply 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: 26184
    
  66

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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Regular expression for allowing space, . , @ ,_ and , -
 
Similar Threads
Doubt on Regular Expression
How to check whether name of the File is in a Specifi format??
How can I add error handling facilities to this code?
Alphabets only valitation
Need help on Unique Javascript validation