ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jowie <joe.n...@mac.com>
Subject RegExp help needed!
Date Mon, 07 Dec 2009 12:02:05 GMT

Hi all,

I'm fumbling my way around Ant and finding the help on the web really
confusing. I am using Ant simply as a macro copy/download/find-replace
utility and am an ActionScript programmer, not a Java one.

Anyway... There's one bit I'm stuck on and really need your help please!

I have used Ant to download an XML file and store it locally. I now need a
way of going through the XML, finding all the image URL attributes,
downloading those images and replacing all the URLs in the XML to local
relative paths. So far, all I have is:

		<loadfile property="questions" srcFile="${local.path}GetAllQuestions.xml"
/>
		<propertyregex input="${questions}" property="questions.output"
regexp="Media=&quot;(.*?)&quot;" select="\1" global="true" />
		<echo message="${questions.output}" />

This only traces the first one in the XML, but obviously I want to find all
of the instances, add them to some kind of array and then loop through that
array and load them all. I've done a for list before so that bit is okay,
but the question is how do I get Ant to iterate through and find all
individual instances of that regexp?

Please help... Thanks!

:-Joe
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26676257.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message