ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Bargnesi" <>
Subject Using replaceregexp with a positive lookbehind regular expression
Date Thu, 01 May 2008 16:44:56 GMT

Here is the replaceregexp call:

<replaceregexp file="\\${host}/${config.remote.path}/${config.remote.file}"
replace="disabled = true">
    <regexp pattern="(?&lt;=\#\[SYD\-DATASOURCE\]\s)disabled\s=\sfalse" />

As you can see I wrote the regular expression: *

To match text like the following:

(line break)
disabled = false
When testing this regular expression out in a testing tool (Regex Creator) I
found that the positive lookbehind
matched *"disabled = false"* perfectly.

But ANT does not properly replace *"disabled = false" *with *"disabled =
true"*.  Is the &lt; throwing ANT
off or is there another reason why the positive lookbehind is failing?

Thanks in advance,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message