Created
March 26, 2018 08:23
-
-
Save barsbek/391704ecd8d3f303dbc8df6e6ea7c00e to your computer and use it in GitHub Desktop.
ruby: regex lookaround
This file contains hidden or 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
(?=foo) # followed by foo | |
(?<=foo) # preceded by foo | |
(?!foo) # is not followed by foo | |
(?<!foo) # is not preceded by foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment