Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Pramod Krishna Murthy
Ranch Hand
Posts: 37
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i need a regular expression to validate a text field which allows alphabets,numerals and special characters(@,&, . , _, space, -) . can anyone help please
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!