<linecontainsregexp>
is only valid inside <filterchain>
. In turn, <filterchain>
s is not supported by task <replaceregexp>
. are only supported by tasks
<replaceregexp>
is usually applied after copying files. <filterchain>
s are applied while copies are performed.
Basically, you have 2 alternatives:
- Modify your
<replaceregexp>
task with a more sophisticated regular expression that only matches what you want, probably resorting to lookarounds. - Add a
<filterchain>
to the<copy>
or<move>
task that you are using to copy these files from your source management system. Include filter<tokenfilter>
, most probably with a child<filetokenizer/>
, and children<containsregex>
and<replaceregex>
as needed. This is much more flexible. There are a couple dozen filters and tokenizers to choose from.