[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49451] matching beginning/end of a word does
[Octave-bug-tracker] [bug #49451] matching beginning/end of a word does not work
Thu, 27 Oct 2016 16:09:54 +0000 (UTC)
Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Follow-up Comment #1, bug #49451 (project octave):
Yeah, this is confusing to me as well. I remembered that I had submitted a fix
for this a while ago.
Turns out that single-quoted strings and double-quoted strings are processed
differently in Octave regexp functions. There are certain escape sequences
that are handled only when the pattern string is a single-quoted string.
* \b means a literal backspace character (while it means word boundary in
* \< \> mean word boundaries
* \oNNN means a specific octal character
So as a workaround, if you use single quotes, then the angle-bracket word
boundary anchors will work. Or use the PCRE word boundary anchor which is just
Anyone else care to comment on the reason for relegating these certain escapes
to single quoted strings only?
Reply to this item at:
Message sent via/by Savannah