What will be proper regular expression for git repositories?
example link: [email protected]:someone/someproject.git
so it will be like [user]@[server]:[project].git
server can be url or ip Project can contain some other characters than alphanumeric like '-' I'm not sure what is the role of '/'
any suggestions?
I'm using the following regular expression for online remote repositories:
((git|ssh|http(s)?)|(git@[\w\.]+))(:(//)?)([\w\.@\:/\-~]+)(\.git)(/)?
View on Debuggex
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With