Skip to main content

Regex

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

Small tip, regex101 has night mode.

Rulex is nice.

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))._