regexp and parentheses: incompatibility with MATLAB

John W. Eaton jwe at octave.org
Sun Mar 1 10:16:21 CST 2009


On  1-Mar-2009, dbateman wrote:

| We already have to partially parse the pattern to deal with matlab style
| named tokens. I suppose if we want  full matla compatibility we should do a
| simple parse of the RE and escape the unescaped special characters.... I'll
| look at this

Since you can't just escape them all but you have to look for
mismatched parens (for example) this seems fairly complex to me, and
something that would be best left to PCRE, which already has to parse
the expression.  Maybe it would be better to fix the problem there.  I
don't see it as a priority for fixing this in Octave, but if you see
an easy way to do it and it can be done in a reliable way, then I
guess it would be OK.

jwe


More information about the Bug-octave mailing list