ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: Parsing file. It works but...
Date Fri, 11 Feb 2005 21:09:00 GMT

--- "Dick, Brian E." <> wrote:
> I need to parse the file and send the two values in
> each line to another
> program. When there is only one value on the line, I
> have to send the
> value twice. Here's the target I wrote to parse the
> file. I looks pretty
> ugly. Can anyone simplify this?

You should be able to modify the regexp you use for
source not to require the space, etc. so that the
pattern is maybe "^([^ ]*).*" or something.  Then
source will be set regardless.  You can set target as
you have been, then avoid the if block by simply
setting target to ${source}, relying on property
immutability.  This could shrink what you've got a
little bit.


Do you Yahoo!? 
All your favorites on one personal page  Try My Yahoo! 

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

View raw message