12 lines
375 B
Plaintext
12 lines
375 B
Plaintext
$string = "a!===b=!=c"
|
|
$separators = [regex]"(==|!=|=)"
|
|
|
|
$matchInfo = $separators.Matches($string) |
|
|
Select-Object -Property Index, Value |
|
|
Group-Object -Property Value |
|
|
Select-Object -Property @{Name="Separator"; Expression={$_.Name}},
|
|
Count,
|
|
@{Name="Position" ; Expression={$_.Group.Index}}
|
|
|
|
$matchInfo
|