Bug 56845 - Enhancement to ReplaceRegExp - suppport mutliple nested regexp
Summary: Enhancement to ReplaceRegExp - suppport mutliple nested regexp
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: unspecified
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2014-08-13 09:51 UTC by icoulter
Modified: 2014-08-13 09:51 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description icoulter 2014-08-13 09:51:18 UTC
Could the regexp task be extended to support multiple regexp and substitution 

For example something like this:

<replaceregexp file="test.txt">
     <regexp pattern="OldProperty=(.*)"/>
     <substitution expression="NewProperty=\1"/>
     <regexp pattern="UserName=Fred"/>
     <substitution expression="UserName=Joe"/>

Main reason for this is due to Bug 34633.  Have seen scenario where I call replaceregexp  on same file multiple times, the first replace works but randomly the subsequent calls fail. Doing all the regexp in one task with one final file move from temp folder back to original might solve this?