Skip to content

Instantly share code, notes, and snippets.

@innerfence
Created August 19, 2010 18:03
Show Gist options
  • Save innerfence/538502 to your computer and use it in GitHub Desktop.
Save innerfence/538502 to your computer and use it in GitHub Desktop.
my ( $numeral, $word, $last_group ) = m{
([0-9]) # $1 = a numeral
,[ ]
(\w+) # $2 = a word
[ ]
(
[(]
[^(]+
[)]
\s? # Explain here why we want to capture the optional space
)+ # $3 = The last of one or more non-nested paren groupings
}xms;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment