Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(?:\(([^)]+)\)|\[\[([^]]+)\]\]|\[([^]]+)\]|Learn more:(.*)|↵|---|\b\d+\.\s*|\s{2,}|\s*\n{2,}|\{\d+\})\s*
/
gm

Description

I don't know why but this probably sucks, it even detects spaces for some reason.

Submitted by Noicc in discord. - a year ago