fix git regex

This commit is contained in:
2016-06-05 09:31:10 +02:00
parent 927262d6d4
commit 6a803f1db9
10 changed files with 12 additions and 24 deletions

View File

@ -26,7 +26,7 @@ export class GitRepo {
* ------------------ helpers ------------------- *
* ---------------------------------------------- */
let gitRegex = function(stringArg:string){
let regexString = /(?:git\+|git\@|https\:\/\/|)(?:https\:\/\/|)([^\/|\:]*)(?:\/|:)([^\/]+)*(?:\/|:)([^\.]+)/;
let regexString = /([a-zA-Z0-9\-\.]*)(?:\/|\:)([a-zA-Z0-9\-]*)(?:\/)([a-zA-Z0-9\-]*)(?:\.git)/;
let regexMatches = regexString.exec(stringArg);
return regexMatches;
};