in reply to How do I extract named variable names from regex string

Note that a-z+ should be [a-z]+ and the second '+' refers only to the character '>'.
my @names; while( $string=~s/\?<([a-z]+)>// ){push(@names,$1);} print "Names: ",join(',',@names),"\n";

Replies are listed 'Best First'.
Re^2: How do I extract named variable names from regex string
by toolic (Bishop) on Jan 30, 2012 at 14:20 UTC
    This is the confusion which results when someone does not use code tags. The OP actually did use [a-z]+, as can be seen when clicking on the xml link, but it rendered poorly.