Community Patterns

Community Library Entry

1

Regular Expression
Created·2022-10-06 19:15
Flavor·PCRE2 (PHP)

/
([#]+)\s*([^!]*)\s*(!\[.*\].*\))([^\n]*)
/
gm
Open regex in editor

Description

I was converting from markdown to another format & it didn't allow images in headers so this Regex finds an image in a header & moves it before the header.

Submitted by thefinnomenon