Skip to content

Instantly share code, notes, and snippets.

@tuliomonteazul
Last active October 25, 2016 16:20
Show Gist options
  • Save tuliomonteazul/193894fb3d1c26be06bdc68193c8eb6b to your computer and use it in GitHub Desktop.
Save tuliomonteazul/193894fb3d1c26be06bdc68193c8eb6b to your computer and use it in GitHub Desktop.

Regex Cheatsheet

Quick reference about regex to look up

Feature: Negative lookahead ?!

Specifies a group that can not match after the main expression (if it matches, the result is discarded). Doesn't work in Javascript, but works on Sublime Text.

Situation: We have a list with the text "user" : "<id>" where the id vary betwen 123, 234, 345. You want to find if there is any other values for <id> that are not included in the list (123, 234, 345).

Regex: user" : "(?!123|234|345)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment