Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
((?:(?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63})
"
gm

Description

Catch domains from str. Details see TEST STRING

Submitted by Casey TSui - 3 months ago