comparison NEWS @ 20325:b6a59cc96bfa

Process backslashes in regexprep replacement strings in Matlab compatible fashion (bug #45407). * NEWS: Announce change. Backslashed escaped ordinary characters are now replaced by the character itself with no emitted warning. * regexp.cc (do_regexp_rep_string_escapes): Change default case statement to silently convert unrecognized escaped character to the bare character itself. Pass the special sequences of '$' and '\' through since these must be handled by lo-regexp.cc. * regexp.cc (Fregexprep): Add BIST tests for new behavior.
author Rik <rik@octave.org>
date Mon, 29 Jun 2015 08:56:22 -0700
parents 5db7eea18d76
children 16b9ec39ff46
comparison
equal deleted inserted replaced
20324:13ede127ec9a 20325:b6a59cc96bfa
9 ** Special octal and hex escape sequences for the pattern and replacement 9 ** Special octal and hex escape sequences for the pattern and replacement
10 strings in regular expressions are now interpreted for Matlab compatibility. 10 strings in regular expressions are now interpreted for Matlab compatibility.
11 11
12 octal: '\oNNN' or '\o{NNN}' 12 octal: '\oNNN' or '\o{NNN}'
13 hex : '\xNN' or '\x{NN}' 13 hex : '\xNN' or '\x{NN}'
14
15 ** Unknown escape sequences in the replacement string for regexprep are now
16 substituted with their unescaped version and no warning is emitted.
17 This change was made for Matlab compatibility.
18
19 Example: regexprep ('a', 'a', 'x\yz')
20 => 'xyz'
14 21
15 ** mkfifo now interprets the MODE argument as an octal, not decimal, integer. 22 ** mkfifo now interprets the MODE argument as an octal, not decimal, integer.
16 This is consistent with the equivalent shell command. 23 This is consistent with the equivalent shell command.
17 24
18 ** The griddata function no longer plots the interpolated mesh if no output 25 ** The griddata function no longer plots the interpolated mesh if no output