Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
*(?:.*\S.*\n)+\n? *: +(?:.|\n)+?(?:\n{2,}(?=\S)(?! *: +)(?! *(?:\S.*\n)+?\n? *: +)|$)
/
g

Description

This is the ECMAScript version of PHP regex for matching definition list as defined in PHP Markdown Extra.

Submitted by Chattille - 3 years ago