Skip to content
Browse files

Merge pull request #2212 from nickanderson/CFE-3171/3.12

CFE-3171/3.12: Added references to dotall and multiline modes for data_regextract()
  • Loading branch information...
nickanderson committed Oct 9, 2019
2 parents a4e47e5 + 71773f9 commit 5c89e541fc23775f86f2fc13272c1997e9423f8a
Showing with 4 additions and 2 deletions.
  1. +4 −2 reference/functions/data_regextract.markdown
@@ -8,7 +8,7 @@ tags: [reference, data functions, functions, json, container, regextract, pcre]
[%CFEngine_function_prototype(regex, string)%]

**Description:** Returns a data container filled with backreferences
and named captures if the [anchored][anchored] `regex` matches the
and named captures if the *multiline* [anchored][anchored] `regex` matches the

This function is significantly better than `regextract()` because it
@@ -36,6 +36,8 @@ PCRE named captures are described in and several syntax
(?'name'...) named capturing group (Perl)
(?P<name>...) named capturing group (Python)

Since the regular expression is run with /dotall/ and /multiline/ modes, to match the end of a line, use ```[^\n]*``` instead of ```$```.

[%CFEngine_function_attributes(regex, string)%]

@@ -50,4 +52,4 @@ Output:

**History:** Was introduced in version 3.7.0 (2015)

**See also:** `regextract()` `regex_replace()`
**See also:** `regextract()`, `regex_replace()`, [pcre2 regular expression syntax summary](

0 comments on commit 5c89e54

Please sign in to comment.
You can’t perform that action at this time.