view .hgsubstate @ 15541:9db32cabeacf

Fix backslash handling in regexp pattern (Bug #37092) * NEWS: Give an example of how escape sequence processing in single-quoted regular expressions works. * libinterp/corefcn/regexp.cc(do_regexp_string_escapes): Rename to do_regexp_ptn_string_escapes. Only sequence to expand is '\b' for backspace. Others are handled by PCRE. * libinterp/corefcn/regexp.cc(do_regexp_rep_string_escapes): New function to do escape sequence processing for the replacement string since the sequences to expand differ from that of the regexp pattern. * liboctave/util/regexp.cc(regexp::replace): Process backslashes in replacement string so that '\$1' results in '$1' rather than replacement with first capture buffer.
author Rik <rik@octave.org>
date Wed, 17 Oct 2012 20:13:19 -0700
parents 181319fb0c8b
children e40ae983288f
line wrap: on
line source

1af55d85d9762a679b4302d5995f05ccd883e956 gnulib
0820083f7fe95d0088971b1233540c7827218e7c libgui/qterminal