octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #35911] Backslash escaping in regexprep replac


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #35911] Backslash escaping in regexprep replacement string incompatibility
Date: Fri, 30 Mar 2012 17:37:54 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 Iceweasel/10.0.2

Follow-up Comment #10, bug #35911 (project octave):

The behavior should be fixed to be compatible for single-quoted strings.  The
change is simple enough, and I see no reason to be incompatible here.  There's
no need for new configuration variables, or to enable this feature only for
--traditional.

If you need to check the behavior to make your script compatible now, I
suggest using a test similar to the following to check whether regexprep does
backslash escape processing on it third argument instead of comparing version
numbers.


exist ('OCTAVE_VERSION') && size (regexprep ('a', 'a', 'n')) == 1
n


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35911>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]