view .hgsub @ 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 017f0b2e6933
children e40ae983288f
line wrap: on
line source

gnulib = [git]git://git.sv.gnu.org/gnulib
libgui/qterminal = [git]https://code.google.com/p/qterminal/