Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JamesMarino/252402c074b8af6de4616f9d85566fb4 to your computer and use it in GitHub Desktop.
Save JamesMarino/252402c074b8af6de4616f9d85566fb4 to your computer and use it in GitHub Desktop.
JetBrains Webstorm Find and Replace Capture Groups

To Find and Replace using Capture Groups

  1. Make sure the Regex Box is ticked
  2. Place your regex inside a capture group in your find box () e.g. \n(query \= \".+)\n - query = text_here will be stored in the first capture group
  3. Use $1 to use the captured group in the replace box

Example

Example using Webstorm Webstorm

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