DEV Community

Discussion on: Refactoring Ruby with Regex

Collapse
 
thorstenhirsch profile image
Thorsten Hirsch

If performance doesn't matter - alright, sometimes regular expressions are a nice solution, although it's hard to believe that they contribute to cleaner code. Just be aware that they have a big negative impact on performance.

Collapse
 
szam profile image
Samuel Grasse-Haroldsen

That is good to know! I had no idea how much of a negative impact regex had on performance. Here I was thinking it was the an optimal solution! Thanks for the heads up!