Regular Expressions 101

Library entries

Regex for mentions @username like twitter

Vote

0

Regular Expression
javascript

/
(?:^|[\W])(@\w{1,20})(?:$|[\W])
/
gm

Description

Loading markdown...
Submitted by anonymous - 3 years ago