This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ForEach ($Line in $InputObject) | |
{ If ($Line.IndexOf("<tr><th") -ge 0) | |
{ $Search = $Line | Select-String -Pattern '<th ?[a-z\-:;"=]*>(.*?)<\/th>' -AllMatches | |
$Index = 0 | |
ForEach ($Match in $Search.Matches) | |
{ If ($Match.Groups[1].Value -eq $Property) | |
{ Break | |
} | |
$Index ++ | |
} | |
If ($Index -eq $Search.Matches.Count) | |
{ Write-Warning "$(Get-Date): Unable to locate property: $Property in table header" | |
Exit | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment