Skip to content

Latest commit

 

History

History
120 lines (109 loc) · 12.7 KB

File metadata and controls

120 lines (109 loc) · 12.7 KB

Regex

Regex Primer is great read.

I use regex101 every time I want write a new regex.

Rulex is nice too.

Notes

  • .* = will select all occurrences
  • A regex is useful for validating simple patterns and for finding patterns in text. For anything beyond that it’s almost certainly a terrible choice.

Code

Match if it has notes or twitter in input ^(?=.*(?:notes|twitter)).*

Match all that don't have notes or twitter in input ^(?!._(?:notes|twitter))._

Links