Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ptkdev/2d36c1e6a04aa18b104d3b72d13a2074 to your computer and use it in GitHub Desktop.
Save ptkdev/2d36c1e6a04aa18b104d3b72d13a2074 to your computer and use it in GitHub Desktop.
Regex Notes

Regex: Delete or select all lines containing string

^.*YOUR_WORD.*$\n

Replace YOUR_WORD

Regex: Delete or select all lines NOT containing string

^((?!YOUR_WORD).)*$

Replace YOUR_WORD

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