DEV Community

Discussion on: Making Regular Expressions Readable in JavaScript

Collapse
 
s11637883 profile image
S • Edited

What about this library xregexp.com/? This library is much heavier, but it can do more. (personally, I don't like heavy things).

Anyway, I see two problems at the moment. First, we need a tool for highlighting patterns, and second, we need, for example, a webpack loader for removing garbage and compressing patterns, especially for client-side applications.

Anyway, I'm not sure it's worth it. I hope the x flag will be added soon.

Collapse
 
rfornal profile image
bob.ts

Thanks for the reference. I do like what I see there ... I am kind of leary of using a tool like that with custom "comments." It would be nice to see some of this functionality added to the JavaScript specs.

I do not intend for my project to have that kind of weight (or functionality for that matter). I don't want to add functionality and dig into the logistics of how Regular Expressions should work.

The tooling I am building is simply to make the Regular Expressions themselves more legible to a developer.

Again, thanks for the reference. I will definitely take a look.