octave-maintainers
[Top][All Lists]
Advanced

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

Re: Backslashes in regular expression replacement patterns


From: John W. Eaton
Subject: Re: Backslashes in regular expression replacement patterns
Date: Wed, 17 Oct 2012 13:46:32 -0400

On 17-Oct-2012, Rik wrote:

| With an expression like "\$1" the
| interpreter itself does one round of escape sequence processing and changes
| this to "$1".  So when I get the replacement string in regexprep I already
| can't tell whether the user typed "\$1" or "$1".

I don't see that this matters.  For example, if to pass the two
character sequence \t to regexp with a double quoted string, you have
to write it as "\\t".  The only question I see is whether we should be
converting unrecognized \X sequences in double quoted strings to X.

jwe


reply via email to

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