ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject Re: regex text out of a file
Date Fri, 20 Jul 2007 20:15:57 GMT
On 7/20/07, Alex Egg <> wrote:
> All I want to do is get the value of the 'src' attribute, how would a
> replaceregex help me?

I'm sorry, but I don't have the time to give you the solution, only
guide you as best I can...

<replaceregex pattern="(\d+) @{pattern}.*" replace="\1" />

The pattern *captures* only the part of the line of interest (using
the parens), and replace the whole line with that capture, in the
replace attribute, with \1, i.e. the first capture. --DD

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

View raw message