With Regular Expressions, you can easily extract matching text. Have a look:
$text = 'The problem was discussed in KB552356. Mail feedback to tobias @powershell.com' $pattern = 'KB\d{4,6}' if ($text -match $pattern) { $matches[0]}
With Regular Expressions, you can easily extract matching text. Have a look:
$text = 'The problem was discussed in KB552356. Mail feedback to tobias @powershell.com' $pattern = 'KB\d{4,6}' if ($text -match $pattern) { $matches[0]}