struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: Trim for regex validator is not working
Date Wed, 13 May 2009 21:23:21 GMT
Siddiq Syed wrote:
> I am searching for the regular expression, which ignore white spaces but no
> sucess so far.
> Any idea ?


According to [1] (which was the top hit when I searched for "java 
+regular expression), "\s" matches any whitespace character. "*" means 0 
or more occurrences. So \s* would match any number of whitespace 
characters. This, of course, isn't a Struts issue.

When I did the afore-mentioned search it returned *many* Java regular 
expression tutorials; I am skeptical that none of them contained this 

You may wish to read [2], which is Sun's regex tutorial. It was among 
the top-most hits when searching. It included this information.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message