Created
January 22, 2020 21:23
-
-
Save vexx32/1260bf8c9c04e42801ab7fb2f9fb5de9 to your computer and use it in GitHub Desktop.
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
$string = 'hostname.database.table.schema' | |
if ($string -match '(?<Hostname>\w+)\.(?<Database>\w+)\.(?<Table>\w+)\.(?<Schema>\w+)') { | |
$matches.Remove(0) | |
[PSCustomObject]$matches | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment