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
/
(?P<a_only>^a)|(?:a:)(?P<a_colon>[^\/].+)|(?P<a_slash>a\/\d{1,2})
/
gi
Input 1
1
New
a a:example.com a:mailers.example.com a/24 a:offsite.example.com/24
Substitution
a a:example.com a:mailers.example.com a/24 a:offsite.example.com/24