Skip to content

Regular expression for matching URLs in Python

License

Notifications You must be signed in to change notification settings

EltonChou/url_regex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

url_regex

Regular expression for matching URLs in Python. This project was made with inspirations from url-regex for NodeJS, I wanted something similar to Python, so here we are.

Requirements

  • Python 3.6 or above

Install

pip install url_regex

Example

import url_regex
findlinks = url_regex.UrlRegex("Hi guys, check out my SoundCloud 🔥: https://soundcloud.com/invalidLink420")

findlinks.detect  # True
findlinks.links  # [<Url full=https://soundcloud.com/invalidLink420 domain=soundcloud.com protocol=https://]

About

Regular expression for matching URLs in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages