Regular Expressions 101

Community Patterns

1...34567...16

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 - 2 years ago