From ant-user Thu May 01 16:44:56 2008 From: "Anthony Bargnesi" Date: Thu, 01 May 2008 16:44:56 +0000 To: ant-user Subject: Using replaceregexp with a positive lookbehind regular expression Message-Id: X-MARC-Message: https://marc.info/?l=ant-user&m=120966033003813 MIME-Version: 1 Content-Type: multipart/mixed; boundary="------=_Part_10721_22996831.1209660296850" ------=_Part_10721_22996831.1209660296850 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, Here is the replaceregexp call: As you can see I wrote the regular expression: * (?<=\#\[SYD\-DATASOURCE\]\s)disabled\s=\sfalse* To match text like the following: *...... (line break) #[SYD-DATASOURCE] 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 < throwing ANT off or is there another reason why the positive lookbehind is failing? Thanks in advance, Tony ------=_Part_10721_22996831.1209660296850--