Regular Expressions 101

Community Patterns

Identify a web URL - non ftp

1

Regular Expression
Python

r"
((http|https)+\:\/\/)?([\w\d-]+\.)*[\w-]+[\.\:]\w+([\/\?\=\&\#\.]?[\w-]+)*\/?
"
gm

Description

From any text identify a web url. File or ftp urls are not a part of the regex.

Submitted by wongz - https://stackoverflow.com/a/63022807/326835 - 2 years ago