RegexReplace Build/Release Task
A task for replacing REGULAR EXPRESSIONS in your files with variables and text in build and release pipelines.
- Azure DevOps - Pipelines
- Team Foundation Server 2015 Update 3 and higher (How to install extensions in TFS)
- Only Windows - sorry, this is due to the lack of Powershell support of the underlying task FX platform :-(
1. Add the RegEx Find & Replace task to your build or release pipeline.
2. Configure the parameters
- Search Paths to Input Files:
- The search patterns to the files that should used in Find & Replace
- New in v3: Supports multiple input lines and minimatching
- Find RegEx:
The Regular Expression to FIND text
RegEx Groups (brackets) are used for the replace option
E.g. find all XML/HTML comments
<!-- (.*) -->
- Replace With:
The text to replace with
$1 is the first group, $2 the second, ...
E.g. replace them with what was within the comment (comment it IN)
- New in v3: UseRAW (default true):
- Whether to use RAW file read mode (might help with replace issues, such as newline)
- New in v3: UseUTF8 (default true):
- Whether to read the file in UTF8 (otherwise in ASCII)
Now published under MIT License.