ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Search and replace in property
Date Tue, 27 Nov 2007 13:21:21 GMT
You could use <antcontrib:propertyregex> for manipulating properties.

Another approach is manipulating the property file with <ant:replaceregexp> BEFORE loading
them.



Jan 

> -----Urspr√ľngliche Nachricht-----
> Von: Ognjen Blagojevic [mailto:ognjen@etf.bg.ac.yu] 
> Gesendet: Dienstag, 27. November 2007 13:55
> An: Ant Users List
> Betreff: Search and replace in property
> 
> Hi all,
> 
> I need tho read the properties from the file, and then to do a string 
> replacement in their values.
> 
> Something like this:
> 
> 1. read_properties
> 2. do_something_with_properties
> 3. replace_in_property('&', '&amp;')
> 4. do_someting_else_with_escaped_properties
> 
> How can I do the step 3?
> 
> 
> The only solution I came up with is to use ReplaceRegExp 
> task, and write 
> escaped properties to another file, and then, reread them. Is there 
> anything smarter than that? Something that avoids creation of 
> another file?
> 
> Regards,
> Ognjen
> 
> ---------------------------------------------------------------------
> 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