Skip to content

Instantly share code, notes, and snippets.

@hoelzro
Created September 18, 2013 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoelzro/6607190 to your computer and use it in GitHub Desktop.
Save hoelzro/6607190 to your computer and use it in GitHub Desktop.
use Test;
plan(1);
my $inner-match;
my regex word { \w+ }
my regex my-match { <word> { $inner-match := $<word> } }
'foo' ~~ /<my-match>/;
ok($inner-match eq 'foo');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment