Skip to content

Commit

Permalink
bring in Jim's improved regex
Browse files Browse the repository at this point in the history
  • Loading branch information
scbedd committed Oct 4, 2022
1 parent b11f3b4 commit 94dc861
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Function Get-Repo-Language {
Write-Error $GitRepoOnDiskErr
exit 1
}
$lang = $remotes[0] | ForEach-Object { if ($_ -match "azure-sdk-for-([a-zA-Z0-9\-\_\.]+)?(\.git)?") {
$lang = $remotes[0] | ForEach-Object { if ($_ -match "azure-sdk-for-(.+?)(?:\.git|-pr|$)") {
#Return match from group 1 which will be the language, pulled from the repository
return $Matches[1]
}
Expand Down

0 comments on commit 94dc861

Please sign in to comment.