Created
November 15, 2011 21:14
-
-
Save dmoulton/1368369 to your computer and use it in GitHub Desktop.
Regular expression challenge
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
I need a regular expression that matches the word 'do' on this line: | |
things.each do |x| | |
but not on this line: | |
x = "do your worst" | |
Specifically, I'd like to match on the word 'do' only when it is NOT followed by a quote character later on the same line. | |
Answers in comments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment