Skip to content

Instantly share code, notes, and snippets.

@qrprat77
Created September 21, 2011 15:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save qrprat77/1232287 to your computer and use it in GitHub Desktop.
#gistperlproblem
For each of the strings (a)--(e), say which of the patterns (i)--(xii) it matches. Where there is a match, what would be the values of $MATCH, $1, $2, etc.?
the quick brown fox jumped over the lazy dog
The Sea! The Sea!
(.+)\s*\1
9780471975632
C:\DOS\PATH\NAME
/[a-z]/
/(\W+)/
/\W*/
/^\w+$/
/[^\w+$]/
/\d/
/(.+)\s*\1/
/((.+)\s*\1)/
/(.+)\s*((\1))/
/\DOS/
/\\DOS/
/\\\DOS/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment