Regular Expressions 101

Community Patterns

Get project name from git url

0

Regular Expression
Golang

`
\/([\w\-]+)(.git)?(@([\w\-\.]+))?$
`
gm

Description

Used by Zarf to obtain the name of a repository when given a git URL.

Submitted by Jonathan Perry - a year ago