[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #37092] backslash escape character in regexp
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #37092] backslash escape character in regexp |
Date: |
Tue, 14 Aug 2012 19:36:32 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1 |
Update of bug #37092 (project octave):
Category: None => Libraries
Status: None => Need Info
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
This is the new behavior of regexp and regexprep in order to be
Matlab-compatible. Quoting from the NEWS file which lists significant changes
from the last revision:
** For compatibility with Matlab, the regexp, regexpi, and regexprep
functions now process backslash escapes in single-quoted pattern
strings. In addition, the regexprep function now processes backslash
escapes in single-quoted replacement strings.
So, patterns like '\\' really look like "\\" which collapses to just "\" and
this causes the problem. It would be useful, if you have access to Matlab, to
verify that they haven't done a special case for '\\'. I rather doubt it
though.
Either add an extra backslash when using escape sequences like "\n" or look at
the regexptranslate function for another option.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37092>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #37092] backslash escape character in regexp, Guillaume, 2012/08/14
- [Octave-bug-tracker] [bug #37092] backslash escape character in regexp,
Rik <=
- [Octave-bug-tracker] [bug #37092] backslash escape character in regexp, Rik, 2012/08/14
- [Octave-bug-tracker] [bug #37092] backslash escape character in regexp, Guillaume, 2012/08/15
- [Octave-bug-tracker] [bug #37092] backslash escape character in regexp, Rik, 2012/08/15
- [Octave-bug-tracker] [bug #37092] backslash escape character in regexp, Rik, 2012/08/15
- [Octave-bug-tracker] [bug #37092] backslash escape character in regexp, Guillaume, 2012/08/16
- [Octave-bug-tracker] [bug #37092] backslash escape character in regexp, Rik, 2012/08/22
- [Octave-bug-tracker] [bug #37092] backslash escape character in regexp, Guillaume, 2012/08/23
- [Octave-bug-tracker] [bug #37092] backslash escape character in regexp, Rik, 2012/08/23