Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^https:\/\/twitter.com\/(?!messages|notifications|settings)[a-zA-Z0-9_]{4,15}($|\/)
/
gm

Description

This regexp tests for Twitter profile urls

Submitted by nbryskin - 2 years ago