Skip to content

Instantly share code, notes, and snippets.

@perlpilot
Created June 6, 2010 07:08
Show Gist options
  • Save perlpilot/427388 to your computer and use it in GitHub Desktop.
Save perlpilot/427388 to your computer and use it in GitHub Desktop.
regex word { \w+ [ \' \w+]? }
regex dup { « <word> \W+ $<word> » }
if $s ~~ m/ <dup> / {
say "Found '{$<dup><word>}' twice in a row";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment