regexp and parentheses: incompatibility with MATLAB

dbateman dbateman at free.fr
Sun Mar 1 03:31:13 CST 2009




Sergei Steshenko-2 wrote:
> 
> Well, in Perl (and I guess PCRE copies the functionality from Perl) it's
> user's duty to disambiguate between \), \( as literal parentheses and
> between (<something>) meant to extract that <something>.
> 
> Do Matlab/Octave allow extraction of the matching <something> in
> (<something>) ?
> 
> If they don't, and PCRE does, then, I think, the application should
> prepend
> () with \, but it becomes ugly, since the application has to parse the RE,
> and this is what it doesn't want to do in the first place ...
> 

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

D. 
-- 
View this message in context: http://www.nabble.com/regexp-and-parentheses%3A-incompatibility-with-MATLAB-tp22229584p22271064.html
Sent from the Octave - Bugs mailing list archive at Nabble.com.



More information about the Bug-octave mailing list