I was testing different regex, with different options, with and without replace, and I didn't close or reload the tester page for hours.
And then I testet a regex, which should have matched 4 lines, but it matched only 3 lines.
I was 100% sure my regex is right, so I testet the regex in Notepad++ and I got 4 matches.
After resetting your RegexTester by reload in the browser, it machted 4 lines, too.
So I have to tell you, that your app is not always resetting properly after every change of an input.
It makes testing regex difficult, because before every minor change, you have to reload the page and fill again all empty inputs.
Sorry, but I don't have the steps to reproduce the error, because I used it for hours.
This is the regex, which had only 3 matches after then:
(?m:^([^\S\n]*)}[^\S\n]*)
if ($InternalCall)
{
return $records
}
# -> now we have to render the collected data in a string to return
$string = @()
$first = $true
$records | ForEach-Object {
if ($first) {
# render first separator line
# if you'd use the whole width of the console, in which powershell was startet, powershell.exe would remove
# the next NewLine, so if you'd increase the width of the console with your mouse, the next line would merge
# into the separator line, which looks not very nice, so I try not to create output with the consoles width
$string += ("+" * $script:outputWidth - 1)
$first = $false
} else {
$string += "*" * 5
}
$string += $_ | Select-Object * | Out-String
}