Last active
December 16, 2015 20:09
-
-
Save ada-lovecraft/5489966 to your computer and use it in GitHub Desktop.
RegEx For Snwspeckle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// grabs the values from your html that represent the array for ansMap | |
((?<=ansMap\[\d] = ')|(?<=ansMap\[\d\d] = '))\w+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Breakdown:
(?<=ansMap[\d] = ') //find any line that starts with: ansMap[] = '
| // or
(?<=ansMap[\d\d] = ') //find any line that starts with: ansMap[] = '
(\d|\w)+ // and match the value that can be either a digit or a letter and get as many of them as possible until you run into something that isn't a digit or a letter.