Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
((?:(?<=\s|\W|\A))@(\w+))
/
gi

Description

for finding user mentions in markdown-like comments

Submitted by Holger Schmidt (https://github.com/forger) - 8 years ago