Re: capture through regex variable

2016-02-22 Thread Tobias Leich
As a rule of thumb: Every non-Letter character after the opening angle bracket makes it non-capturing. Am 22.02.2016 um 11:37 schrieb Theo van den Heuvel: Thanks Patrick, it works great. Theo Patrick R. Michaud schreef op 2016-02-22 11:16: Dynamic subregexes such as <$top> are

Re: capture through regex variable

2016-02-22 Thread Theo van den Heuvel
Thanks Patrick, it works great. Theo Patrick R. Michaud schreef op 2016-02-22 11:16: Dynamic subregexes such as <$top> are non-capturing by default. You can easily capture the result by using something like

capture through regex variable

2016-02-22 Thread Theo van den Heuvel
Hi all, I am trying to change a regex programmatically. For that I insert a variable in another regex. However, the match object appears to have lost the capture of the inner regex. In a code example: = my Match $match; my $top = rx/ \( $ = [ \w* ] \) /; given "(abc)" { $match =