Skip to content

Commit

Permalink
Change form regex to RegEx
Browse files Browse the repository at this point in the history
  • Loading branch information
reuteras committed Dec 21, 2023
1 parent eb4da86 commit 106ffba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/download/http.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

# Get uri for latest nuget - ugly
$choco = Get-ChocolateyUrl chocolatey
$nodejs = Get-DownloadUrlFromPage -url https://nodejs.org/en/download/ -regex 'https:[^"]+win-x64.zip'
$nodejs = Get-DownloadUrlFromPage -url https://nodejs.org/en/download/ -RegEx 'https:[^"]+win-x64.zip'

# Get URI for Visual Studio Code python extension - ugly
$vscode_python_string = Get-DownloadUrlFromPage -url https://marketplace.visualstudio.com/items?itemName=ms-python.python -regex '"AssetUri":"[^"]+python/([^/]+)/'
$vscode_python_string = Get-DownloadUrlFromPage -url https://marketplace.visualstudio.com/items?itemName=ms-python.python -RegEx '"AssetUri":"[^"]+python/([^/]+)/'
$vscode_tmp = $vscode_python_string | Select-String -Pattern '"AssetUri":"[^"]+python/([^/]+)/'
$vscode_python_version=$vscode_tmp.Matches.Groups[1].Value

# Get URI for Visual Studio Code mermaid extension - ugly
$vscode_mermaid_string = Get-DownloadUrlFromPage -url https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid -regex '"AssetUri":"[^"]+markdown-mermaid/([^/]+)/'
$vscode_mermaid_string = Get-DownloadUrlFromPage -url https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid -RegEx '"AssetUri":"[^"]+markdown-mermaid/([^/]+)/'
$vscode_tmp = $vscode_mermaid_string | Select-String -Pattern '"AssetUri":"[^"]+markdown-mermaid/([^/]+)/'
$vscode_mermaid_version=$vscode_tmp.Matches.Groups[1].Value

Expand Down

0 comments on commit 106ffba

Please sign in to comment.