46
submitted 4 days ago by trevor@lemmy.ml to c/opensource@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] arran4@aussie.zone 1 points 4 days ago

Does it do exclusions? Can it merge regexp?

[-] trevor@lemmy.ml 1 points 4 days ago* (last edited 4 days ago)

Those would be interesting features, but it currently only operates on plain text lists, or lists with wildcards (*) which are converted into regexp (.*), or lists with CIDR suffixes (127.0.0.0/24). You can disable escaping, but list2regexp doesn't understand the individual segments of regular expressions, so the result will probably be wrong.

With that said, the library being used to handle escaping and testing the generated patterns (regexp2) does expose the syntax tree so the information is available to do interesting things with, such as what you suggest.

[-] arran4@aussie.zone 1 points 4 days ago

Merging probably has more value as people would understand the edge cases, with generated regexp it would be harder for someone to confidently understand the edges without having a deeper understanding of the algorithm and data set.

this post was submitted on 17 Sep 2026
46 points (97.9% liked)

Open Source

49130 readers
867 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 7 years ago
MODERATORS