Hey, thanks for the report. It’s well structured and has clear repro steps.
This is a valid issue. VS Code, and Cursor by extension, doesn’t guard against expensive regex patterns in Search. Your catastrophic backtracking example really should time out instead of crashing the IDE.
I’ve shared this with the team along with your repro steps and the regex101 link. For now there’s no workaround other than avoiding those patterns.
Let me know if you hit this in real work, not just a test case. That’ll help us gauge priority.
Glad to help. Yea I hit it with real work. While structuring a valid search pattern I hit a catastrophic backtrack and crashed the IDE mid work. Didn’t lose any work though.
Hi @post4k, thanks for the well-structured report. The team is aware of this issue.
As a practical tip in the meantime, try to avoid nested quantifiers with overlapping character classes (like ([\s\S]|[^;])+) - using a simpler non-backtracking equivalent like [\s\S]+? can help prevent these crashes.