Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs: Is it possible to match strings with balanced parens with emacs regex?

Tags:

regex

emacs

Something like this:
http://perl.plover.com/yak/regex/samples/slide083.html

In other words I want to match successfully on { { foo } { bar} } but not on { { foo } .

I see it's possible in perl, and in .NET. Is it possible in emacs regex?

like image 826
Cheeso Avatar asked Feb 04 '23 04:02

Cheeso


1 Answers

No, so far Perl/PCRE and .NET are the only regex flavors that support arbitrary nesting (recursive patterns).

like image 98
Tim Pietzcker Avatar answered Feb 06 '23 10:02

Tim Pietzcker