http://qs321.pair.com?node_id=210365


in reply to Re: conditional match in regex
in thread conditional match in regex

This also seems to work (at least in perl 5.6.1):
/ ^ ( [\$%@*] | (<) ) ( .* ) (? (2) > ) # ( (2) stands for $2 (the (<) above)) $ /x;


  p