Regular Expressions 101

Identify a web URL - non ftp

Open Workspace
  • Python
  • Match
1

Regular Expression

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