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"
(?:^(\w{1,255}):(.{1,255})@|^)(?:(?:(?=\S{0,253}(?:$|:| ))((?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+(?:[a-z0-9]{1,63})))|localhost)(:\d{1,5})?
"
gmi
Unit Tests
There are no unit tests, click
here
to add some.