Skip to content

Instantly share code, notes, and snippets.

@jpwilliams
Last active September 29, 2016 08:14
Show Gist options
  • Save jpwilliams/61e1dd5d0acb50e29bb8c632ff05de2d to your computer and use it in GitHub Desktop.
Save jpwilliams/61e1dd5d0acb50e29bb8c632ff05de2d to your computer and use it in GitHub Desktop.
Simple Markdown Single Regex
// Very simple regex that supports ```big code blocks```,
// `code highlights`, *bold*, _italic_ and ~strikethrough~,
// isolating each group.
/(`{3}([\S\s]+?)`{3})|(`(.+?)`)|(\*(.+?)\*)|(_(.+?)_)|(~(.+?)~)|(\n)|(.+?)/gm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment