jetbrains.buildServer.configs.kotlin.v10.buildFeatures / FileContentReplacer / RegexMode

RegexMode

enum class RegexMode

Controls the way the search pattern and the replacement text are interpreted.

Since
2017.1

Enum Values

FIXED_STRINGS

Treat both the search pattern and the replacement text as fixed strings, similarly to grep -F|--fixed-strings. LITERAL mode is on. Equivalent to un-checking the Regex box in the File ContentReplacer UI.

REGEX

Treat both the search pattern and the replacement text as regular expressions. Trailing \ or single $ characters are not allowed in the replacement text. MULTILINE mode is on by default. Equivalent to checking the Regex box in the File ContentReplacer UI. This is the only mode in TeamCity 9.1 and 10.0 and the default one since 2017.1.

REGEX_MIXED

Treat the search pattern as a regular expression (similarly to REGEX), but quote the replacement text (as in FIXED_STRINGS mode). \ and $ characters have no special meaning. MULTILINE mode is on by default. Useful if the replacement text contains %build.parameters% which may be expanded to an arbitrary value. This mode is not available via the TeamCity UI.