in reply to Re^2: Parse::RecDescent matching same line twicein thread Parse::RecDescent matching same line twice
'XZ' =~ / ^ (?: X (?{ print "X" }) Y (?{ print "Y" }) | X (?{ print "X" }) Z (?{ print "Z" }) ) \z /x; print("\n"); [download]
XXZ [download]