Co

Compose-regexp.js Build readable and maintainable RegExps. ReDOS begone

Hacker News

Compose-regexp.js Build readable and maintainable RegExps. ReDOS begone

This is an old lib I just rejuvenated, adding support for Unicode RegExps, properly handling back-references, and taking advantage of these to create helpers that turn things that are usually too impractical to use into usable techniques. It lets you write anything you'd write with normal RegExps, but with a more readable syntax, and it lets you compose sub-expressions into larger patterns. It also provides helpers like: - `atomic()` that prevents the engine from backtracking into what you passed as argument. No more ReDOS. - `bound()` works like `\b` but for arbitrary character sets. E.g. `bound(/[_\p{L}\p{Number}]/u)` is a Unicode-aware `\b` - Set operations on character classes: `charSet.intersection(/\p{Lowercase}/u, /\p{Script=Greek}/u)` will only match lower case greek letters I hope you'll find it useful!

Share card

Actual performance

6points
1comments
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
72%72% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: code · Missing: mac, agents, macos
51%51% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
45%45% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: ide, io · Missing: https docs, excited, just released
36%36% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
26%26% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
16%16% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
1%1% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Re
Readable expressjs errors34%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Readable expressjs errors

Hacker News1
Bu
Build SPA with Alpine.js44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Build SPA with Alpine.js

Hacker News1
Pr
Prompt-Compose.js Use Axioms and Compositions to Build Modular Prompts44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Prompt-Compose.js Use Axioms and Compositions to Build Modular Prompts

Hacker News6
We
WeExpire – Notes readable only after your death41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

WeExpire – Notes readable only after your death

Hacker News25
Pa
ParseHumanDate.js A robust library to parse human readable dates32%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

ParseHumanDate.js A robust library to parse human readable dates

Hacker News4
Hu
Human Readable Magazine Is on Kickstarter40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Human Readable Magazine Is on Kickstarter

Hacker News1
Hu
Human Readable Intervals for Node.js40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Human Readable Intervals for Node.js

Hacker News1
De
Declaratively compose, render and export SDF geometries using js25%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Declaratively compose, render and export SDF geometries using js

Hacker News2
Bu
Build Vue.js apps on Sqlite73%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Build Vue.js apps on Sqlite

Hacker News5
Mb
Mber, very fast Ember.js build system without broccoli62%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Mber, very fast Ember.js build system without broccoli

Hacker News1