Anlage des Repos
This commit is contained in:
15
test/Regex-test1.ps1
Normal file
15
test/Regex-test1.ps1
Normal file
@@ -0,0 +1,15 @@
|
||||
cls
|
||||
|
||||
# PowerShell RegEx with Groups as result
|
||||
# Help from https://mcpmag.com/articles/2015/09/30/regex-groups-with-powershell.aspx
|
||||
|
||||
$txt1 = $NULL
|
||||
$res1 = $NULL
|
||||
|
||||
$txt1 = "#SCAN#DD-Eingangsrechnung"
|
||||
|
||||
#$res1 = ($txt1 | Select-String -pattern "(?:#SCAN#(DD-[a-zA-Z-üÜöÖäÄ]{1,}))" -AllMatches | %{$_.matches} | %{$_.value})
|
||||
|
||||
$res1 = ([regex]::Match("$txt1", "(?:#SCAN#(DD-[a-zA-Z-üÜöÖäÄ]{1,}))").Groups[1].Value)
|
||||
|
||||
echo $res1
|
||||
Reference in New Issue
Block a user