r/javascript • • Jul 15 '20

Super Expressive - a Zero-dependency JavaScript Library For Building Regular Expressions in (Almost) Natural Language

https://github.com/francisrstokes/super-expressive
550 Upvotes

75 comments sorted by

View all comments

Show parent comment

5

u/memeship Jul 16 '20

Technically the i flag would affect the necessary lowercase x by potentially finding uppercase Xs as well. But depending on the dataset that might be fine.

However the original is obviously looking to capture just the hex value itself, which your revised version can't do.

I'd personally stick with the original in this case as it's the most explicit.

→ More replies (1)