Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-10-02 19:09
Updated·2022-10-02 19:11
Flavor·Python

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

Description

Match git URL components (including partial URLs).

Submitted by anonymous