Skip to content

Instantly share code, notes, and snippets.

@juliendargelos
Created October 22, 2019 14:47
Show Gist options
  • Save juliendargelos/e9e6fd28ed453e5fa9d0310aae37746c to your computer and use it in GitHub Desktop.
Save juliendargelos/e9e6fd28ed453e5fa9d0310aae37746c to your computer and use it in GitHub Desktop.

https://stackoverflow.com/a/3926546/4867982

Lookaround Name What it Does
(?=foo) Lookahead Asserts that what immediately follows the current position in the string is foo
(?<=foo) Lookbehind Asserts that what immediately precedes the current position in the string is foo
(?!foo) Negative Lookahead Asserts that what immediately follows the current position in the string is not foo
(?<!foo) Negative Lookbehind Asserts that what immediately precedes the current position in the string is not foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment