by kevstev · 5mo ago · 0 comments
Writing a regex involves always looking up the syntax, and being unable to read it an hour later without having to carefully disect it. I say this with 20+ YOE and I think I am better than the average bear with them.
That said, knowing what they can do is important and very useful. Its just the implementation that never quite sticks.
No. I mean, I believe it does for you. I use it often enough that it's always fresh. On the other hand, I always need to look up the syntax of CREATE TABLE. My experience can be described the same as yours.
(Other big problem with regexes is that they are strictly slower than handrolling the equivalent string parsing code, and kind of a denial of service hazard to boot).
SQL also tends to be slower than hand optimized data structure wrangling.
If you use untrusted regex, you'll be subject to DOS. If you use untrusted SQL, you'll be subject to much worse.