Skip to content

Instantly share code, notes, and snippets.

@jmahc
Created September 7, 2016 19:41
Show Gist options
  • Save jmahc/ddcad0425062182fa955a5048f41a252 to your computer and use it in GitHub Desktop.
Save jmahc/ddcad0425062182fa955a5048f41a252 to your computer and use it in GitHub Desktop.
Commonly used Regex by Jordan McArdle
// Selects id's inside of an HTML tag that has a space before it.
` id="[^"]+"`
// Select `headings"` inside of an HTML tag that has a double quote after it, without a space or hyphen before it.
// Used to grab the class name headings in this case
`(?<! )+(?<!-)+(?=headings")\w+([headings"])`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment