Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created2016-03-02 08:31
FlavorPython

r"
^(?:(?:http|https)://)?((?:[A-Z袗-携衼0-9](?:[A-Z袗-携衼0-9-]{0,61}[A-Z袗-携衼0-9])?\.)+(?:[A-Z袗-携衼]{2,6}\.?|[A-Z袗-携衼0-9-]{2,}(?<!-)\.?))(?:/?|[/?]\S+)$
"
iu
Open regex in editor

Description

Matches domain name of URL, supports standart and Cyrillic IDN URLs

Submitted by MrYodda