Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
^((?:https?://(?:www\.)?|www\.)(?:(?!-)[A-Za-z0-9-]+\.[a-z]+)(?:\/[A-Za-z0-9-_]+\/?)*(?:[?&][A-Za-z0-9-\=\+_]+)*(?:\.[a-z]+)*)$|^((?:\d{1,3}\.){3}\d{1,3}(?:\:\d+)?)$
"
gm

Description

no description available

Submitted by anonymous - 6 years ago