{"version":"2.1.219","anchor":"dangerous-delete-detection-uses-a-prebuilt-regex","canonical_anchor":"dangerous-delete-detection-uses-a-prebuilt-regex","heading":"Dangerous-delete detection uses a prebuilt regex","tier":"notice","area":"Permissions","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.219\/e\/dangerous-delete-detection-uses-a-prebuilt-regex","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.219","markdown":"### Dangerous-delete detection uses a prebuilt regex\n\nPermission checks for risky delete commands do slightly less work each time, with identical results.\n\n**What**\n\nThe PowerShell and cmd delete-command matcher no longer rebuilds its alternation on every call.\n\n**Details**\n\n- The matcher takes a second parameter and tests against a module-level regex compiled once from the same `rm|remove-item|ri|del|erase` alternation\n- Matching behaviour is unchanged; this removes per-invocation work on a hot permission path\n\n**Evidence**\n\n`rm|remove-item|ri|del|erase`\n\n- Area: Permissions\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 0\/5"}