The /o in Ruby regex stands for “oh the humanity!” - JP Camara
08-Aug-2025 6
Hi there! Do you like Regex? Do you like performance? Do you like creating confounding bugs for yourself rooted in the mechanics of the Ruby VM itself?
If you said yes to all of the above, have I got a feature for you!
But first, let’s start with a story.
The cliffs of insanity
I was recently reviewing some code, and part of the functionality was about matching. A class took an array of strings, and you could call a method to see if an input matched part of any of the strings. Stripped down, it was effectively the following code:.
The /o in Ruby regex stands for “oh the humanity!” - JP Camara #ruby #rubydeveloper #rubyonrails #regex #stands #humanity!” #Camara https://rubyonrails.ba/link/the-o-in-ruby-regex-stands-for-oh-the-humanity-jp-camara