Regular Expressions 101

Community Patterns

MARKDOWN title reader

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^#+\s*(.*?)\{#(.*)\}
/
gm

Description

matches the titles from a markdown starting with #

i.e.

Campaign uploader {#15mins-campaign-uploader}

Submitted by Deepak O - 10 months ago