If you’re using Git for version control, you may want to know how to match Git repository URLs.
My problem was when I wanted to create a regex for this purpose. It took me hours before I found what I believe to be the best regex code for tasks like these. With this tutorial, hopefully, you’ll save yourself some time and make your job easier.
- [email protected]:microsoft/microsoft.git
- [email protected]:~user/path/to/repo.git/