in reply to To not capture recursive group while collecting certain matches

> clean from matched recursive ?

There are no "recursive" inner matches returned.

It's unclear what you want but the following demonstrates how to match only at the top level of a recursive match.

DB<173> x 'bla[[abc]]foo' =~ / ( \[ (?1)* \w* \] ) /xg; 0 '[[abc]]'

Not what you wanted?

Then see how (not) to ask a question

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re: To not capture recursive group while collecting certain matches
  • Download Code