Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
r"
^(?:.*twitter\.com/|@?)(\w{1,15})(?:$|/.*$)
"
gm
Input 1
1
New
myhandle @myhandle @my_handle_2 twitter.com/myhandle https://twitter.com/myhandle https://twitter.com/myhandle/randomstuff mysuperhandleistoolong @mysuperhandleistoolong https://twitter.com/mysuperhandleistoolong