mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-04-18 05:34:47 +10:00
fix regex
This commit is contained in:
@@ -550,11 +550,11 @@ $testHosts = Test-Path -Path $pathHosts
|
|||||||
if ($testHosts) {
|
if ($testHosts) {
|
||||||
$hosts = Get-Content -Path $pathHosts
|
$hosts = Get-Content -Path $pathHosts
|
||||||
|
|
||||||
if ($hosts -match '^[^\#| ].+scdn.+|^[^\#].+spotify.+') {
|
if ($hosts -match '^[^\#|].+scdn.+|^[^\#|].+spotify.+') {
|
||||||
Write-Host ($lang).HostDel`n
|
Write-Host ($lang).HostDel`n
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$hosts = $hosts -replace '^[^\#| ].+scdn.+|^[^\#| ].+spotify.+', ''
|
$hosts = $hosts -replace '^[^\#|].+scdn.+|^[^\#|].+spotify.+', ''
|
||||||
Set-Content -Path $pathHosts -Value $hosts -Force
|
Set-Content -Path $pathHosts -Value $hosts -Force
|
||||||
$hosts | Where-Object { $_.trim() -ne "" } | Set-Content -Path $pathHosts -Force
|
$hosts | Where-Object { $_.trim() -ne "" } | Set-Content -Path $pathHosts -Force
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user