Author: Matthew Dowst

RegexStrings

Find Email Address in String

$emailRegex = @" (?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\]) "@ [Regex]::Matches($string, $emailRegex).Value
GeneralTools

Copy Your Profile from ISE to Visual Studio Code

# Get the path to the Profile files $ISEProfile = Join-Path (Split-Path $profile) "Microsoft.PowerShellISE_profile.ps1" $VSCProfile = Join-Path (Split-Path $profile) "Microsoft.VSCode_profile.ps1" # If the ISE Profile exists write the content to the VSCode Profile if(Test-Path $ISEProfile){ # Check if profile exists, create if it does not if(!(Test-Path $VSCProfile)){ New-Item $VSCProfile -ItemType file -Force } # write content to VSCode Profile "`n#...