This is my first question. I am just starting out with Powershell.
Say I have a text file, and I want to combine only lines longer than 10 characters. So I made a very simple regex.
$reg = "^\w{0,10}$"
And I use the notmatch operator.
$myTextFile | Select-String -NotMatch $reg
This does not work. I also tried
$reg = "^[a-zA-Z0-9]{0,10}$"
but it doesnβt work either.
Any clue for me? Many thanks!
source share