DEV Community

Discussion on: Making Regular Expressions Readable in JavaScript

Collapse
 
rfornal profile image
bob.ts

The slowdown is negligible. If used in a service or class, the regex can be generated once.

As to people who “aren’t so good at regex,” I always write my code with the assumption that someone else has to figure out what I did and if I can make readability easier, I should. That is what the whole project is about.

Tagged template: hadn’t thought of that. I’ll look into it.

Thanks!