Regular Expressions 101

Community Patterns

`git` URL

0

Regular Expression
Python

r"
^(https|git)(:\/\/|@)([^\/:]+)[\/:]([^\/:]+)(?:\/(.+).git)?$
"
gm

Description

Match git URL components (including partial URLs).

Submitted by anonymous - a year ago (Last modified a year ago)