Fast(er) regular expression engines in Ruby
21-Jun-2025 44
With modern, overengineered, and over-obfuscated websites, we at SerpApi face increasing challenges with extracting data from them. Beside the usual HTML parsing, sometimes we're literally forced to fall back to good 'ol regular expressions, e.g. for extracting embedded JS data. And while regexps do the trick, they might come at a cost.
Onigmo, the default regexp engine in Ruby, while substantially updated in Ruby 3.2, still has weak points that may really upset in terms of scan time, adding latency to our search requests.
Fast(er) regular expression engines in Ruby #ruby #rubydeveloper #rubyonrails #Fast(er) #regular #expression #engines #engines https://rubyonrails.ba/link/fast-er-regular-expression-engines-in-ruby