Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Regular expression - help needed

Reply
Thread Tools

Regular expression - help needed

 
 
Chanchal
Guest
Posts: n/a
 
      12-13-2005
Hi ,

this might sound silly, i'm using
org.apache.commons.validator.GenericValidator class, for some
validation. I need to check if a string contains only alphabets. i
wrote the code as

org.apache.commons.validator.GenericValidator.matc hRegexp(value,
"[a-zA-Z]")

but it is not workiing. Please advice

Chanchal

 
Reply With Quote
 
 
 
 
NullBock
Guest
Posts: n/a
 
      12-13-2005
try GenericValidator.matchRegexp(value, "^[a-zA-Z]+$")


Walter Gildersleeve
Freiburg, Germany

__________________________________________________ ____
http://linkfrog.net
URL Shortening
Free and easy, small and green.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expression - Help needed ragz_82 Java 1 08-04-2009 07:59 AM
quick help needed on regular expression validator David Cho ASP .Net 4 02-15-2005 09:47 AM
Help needed: cryptic perl regular expression in python syntax pekka niiranen Python 5 10-20-2004 12:39 PM
regular expression help needed Gianni B. ASP General 0 09-06-2004 02:02 AM
Dynamically changing the regular expression of Regular Expression validator VSK ASP .Net 2 08-24-2003 02:47 PM



Advertisments