Regular Expressions 101

Community Patterns

how I retrieve the domain without www or other cruft

0

Regular Expression
Python

r"
(?P<schema>.*://)?(?P<cedentials>.*@)?(?P<www>www\.)?(?P<domain>[\w\.]+)(?P<path_query>/?.*)?
"
g

Description

no description available

Submitted by bronsen - 10 years ago