Skip to content

Instantly share code, notes, and snippets.

@oneblackcrayon
Created May 7, 2014 19:08
Show Gist options
  • Save oneblackcrayon/4a76554f56b8c4bd634f to your computer and use it in GitHub Desktop.
Save oneblackcrayon/4a76554f56b8c4bd634f to your computer and use it in GitHub Desktop.
Find content between an HTML tag pair and replace everything outside of them.

In TextWrangler (GREP based):

Find field:

.*?<article>(.*?)</article>.*

Replace field:

\1\n

In Sublime Text (REGEX based):

Find field:

.*?<article>(.*?)</article>.*

Replace field:

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