Examples/Vulnerable_ReDoS_1.ps1

function Test-ReDoSUnsafe {
    param($name)

    $pattern = '(x+)+y'
    return [regex]::IsMatch($name, $pattern)
}