struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
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 
information.

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.

Dave

[1] http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
[2] http://java.sun.com/docs/books/tutorial/essential/regex/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message