(un)Regular Expressions

A collection of useful RegEx snippets. Created and collected over the years.

Name Regex Flags Note Example
ISBN-10 & 13 (ISBN[-]*(1[03])*[ ]*(: ){0,1})*(([0-9Xx][- ]*){13}|([0-9Xx][- ]*){10}) g Matches the ISBN number and the check digit Link
Markdown Tables |.*\|\n\|\s*[:-]+.*\n(?:\|.*\|\s*\n)* gm Matches each markdown table in a document Link

By Paul, based on Jekyll-DB.