PCRE2_SUBSTITUTE_UNSET_EMPTY causes unset capture groups (including unknown groups when PCRE2_SUBSTITUTE_UNKNOWN_UNSET is set) to be treated as empty strings when inserted as described above. If this option is not set, an attempt to insert an unset group causes the PCRE2_ERROR_UNSET error. This option does not influence the extended substitution syntax described below.
Version info
fish --version
echo $version
uname -a
echo $TERM
Description
string replace
prints an error when I try to substitute a back reference to an optional capture group that was not matched.Steps to reproduce
Fish
Output
Perl
Output
I expected
string replace
to behave similar to perl because the docs mention "Perl-compatible" regular expressions.The text was updated successfully, but these errors were encountered: