cpp > C++ 11 Regex Replace

Testing C++ 11 regex_replace function

author @regular.express

Image on regexpress/cpp


  • * string regex
    Regular expression.
  • string replace
    Replace string.
  • list syntax_type
    Grammer of regex. These member constants are aliases of the homonym constants under the std::regex_constants namespace.
  • boolean match_not_bol
    The first character is not considered a beginning of line ("^" does not match).
  • boolean match_not_eol
    The last character is not considered an end of line ("$" does not match).
  • boolean match_not_bow
    The escape sequence "\b" does not match as a beginning-of-word.
  • boolean match_not_eow
    The escape sequence "\b" does not match as an end-of-word.
  • boolean match_any
    Any match is acceptable if more than one match is possible.
  • boolean match_not_null
    Empty sequences do not match.
  • boolean match_continuous
    The expression must match a sub-sequence that begins at the first character. Sub-sequences must begin at the first character to match.
  • boolean match_prev_avail
    One or more characters exist before the first one. (match_not_bol and match_not_bow are ignored)
  • boolean format_sed
    Uses the same rules as the sed utility in POSIX to replace matches.
  • boolean format_no_copy
    The sections in the target sequence that do not match the regular expression are not copied when replacing matches.
  • boolean format_first_only
    Only the first occurrence of a regular expression is replaced.