Regular Expressions 101

Community Patterns

My citations remover.

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. - 3 months ago