ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erskine, Chris" <chris.ersk...@eds.com>
Subject RE: regular expression
Date Fri, 04 Mar 2005 16:52:42 GMT
Note that that would fail due to not having a comma after the last digit.

Chris Erskine
 
EDS Consulting Services
Colorado Springs, CO 
 
Phone: 719-265-5962
Cell: 719-640-6488


> -----Original Message-----
> From: Mark Lundquist [mailto:mlundquist2@comcast.net]
> Sent: Friday, March 04, 2005 9:46 AM
> To: Ant Users List
> Subject: Re: regular expression
> 
> 
> On Mar 4, 2005, at 8:38 AM, Radha Sangal wrote:
> 
> > Could someone help me build regular expression for a string like this
> > 1,6,3,2.
> >
> >
> >
> > I am getting error if I write it like this String patternStr =
> > "([0-9]+","+[0-9]+","+[0-9]+","+[0-9] + )"
> 
> well yeah :-)... the above is not a valid string literal.  Look at all
> those double-quotes!
> 
> Try this:
> 
> String patternStr = "([0-9],){4}+";
> 
> See
> http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html to
> learn how to write regexps.
> 
> GL,
> -ml-
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

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


Mime
View raw message