2026-03-24 06:20:22
finding all regex matches has always been O(n²). even in the engines built to prevent it
every regex engine that promises linear time breaks that promise the moment you ask for all matches. the problem has been there since the 70s, hiding in plain sight.
— by ian erik varatalu
🤔 https://iev.ee/blog/the-…
![Screenshot of me serpl with Search, Replace, Result List and Preview panes in a command-line interface. Search has /setup and [Match Case] mode selected, Replace has /settings with [Simple] mode selected. The Results List shows about 20 items and the selected file is shown in the preview pane with three replacements in diff-style red/green highlighting on lines 27, 28, and 35.](https://s3-eu-central-1.amazonaws.com/mastodon-aral/media_attachments/files/116/018/395/920/498/956/small/410fe9292b452830.jpeg)
