ant-user mailing list archives

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

--- "Dick, Brian E." <Brian.Dick@FMR.com> wrote:
[SNIP]
> 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.

HTH,
Matt



		
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page  Try My Yahoo!
http://my.yahoo.com 

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


Mime
View raw message