DEV Community

Discussion on: Why not regexp?

Collapse
 
moopet profile image
Ben Sinclair

Hot take: regexp isn't more or less difficult than async and callbacks in Javascript.
You can do it the "too clever for your own good" way and make terse, unreadable code, or you can lay it out in a more straightforward manner if you choose to.

Collapse
 
kwstannard profile image
Kelly Stannard

Thanks Ben. I don't think I can agree with that assessment. I may be under-informed in this area, but I have never heard of a Javascript callback hell creating a security vulnerability like what happens with regexp regularly. I have also seen plenty of devs (myself included) mess up what should have been simple and straight forward text matching cases.