ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist <mlundqui...@comcast.net>
Subject Re: regular expression
Date Fri, 04 Mar 2005 16:57:21 GMT

On Mar 4, 2005, at 8:48 AM, dbrosius@qis.net wrote:

> Quoting Radha Sangal <Radha.Sangal@pega.com>:
>
>> 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] + )";
>>
>>
>
> wouldn't this work?
>
> [0-9]+(,[0-9]){3}

Oh yeah, d'oh... my r.e. was wrong, it wants an extra comma :-(... 
however I think you do need either a '+' or a '?' after the '{3}', 
right?

—ml—


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message