DhanaGitHub / maven-replacer-plugin

Automatically exported from code.google.com/p/maven-replacer-plugin
0 stars 0 forks source link

Regex replacement over several lines #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,
it would be useful to add support to regex-replace several lines in a file.
Now its only possible to replace on one line.

Example text in file:

<!--removedByBuildStart-->
 This is text I want to replace....
<!--removedByBuildEnd-->

And with a regex like this to replace all these lines:
<token>(?m)&lt;!--removedByBuildStart(.|\s)*?removedByBuildEnd--&gt;</token>

Thanks for a great plugin!

Original issue reported on code.google.com by magnus%j...@gtempaccount.com on 25 Sep 2009 at 9:21

GoogleCodeExporter commented 9 years ago
I'll investigate this and let you know.

Original comment by baker.st...@gmail.com on 27 Sep 2009 at 12:40

GoogleCodeExporter commented 9 years ago
Completed in 1.0.3
I have also made the value parameter not required, so you can replace tokens 
with no
value (blank) if you want, effectively removing all tokens.

Let me know if you have any problems.
P.S. Sorry this took so long to complete.

Original comment by baker.st...@gmail.com on 3 Oct 2009 at 12:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thank you very much! It works perfectly!

Original comment by magnus%j...@gtempaccount.com on 7 Oct 2009 at 8:11

GoogleCodeExporter commented 9 years ago

Original comment by baker.st...@gmail.com on 20 Dec 2009 at 11:14