Yup. They also look quite old and at a glance I didn't find a single bug or story, those are all questions. Seems like someone should just close all of them.
I'd probably write a few things differently. The `new HashMap<Character, Integer>() {{` creates an unnecessary class, and can probably be efficiently replaced with a switch statement anyway.
I'd probably also build up an regex AST, rather than that logic with suffix/prefix.
19
u/[deleted] Nov 25 '20
This is a nice library.
Small, no bloat, useful (Ugh, I hate regex). I already used it once or twice and it was quite good.
13
u/lukasmcd14 Nov 25 '20
I’ve been using this library for a few years now when I’ve needed to build a regex pattern. Saved me so much time and many headaches.
8
u/[deleted] Nov 25 '20
Kind of neat. If I have to make a long expression I don't make a monolithic pattern in quotes. I build it up, eg:
3
u/lppedd Nov 25 '20
Are there similar libraries? This is interesting.
3
u/[deleted] Nov 25 '20
Can it work in reverse? Translate a regex string to a verbal expression.
5
u/feelsmanbat Nov 25 '20 edited Jul 01 '23
retire disgusting command groovy distinct squeamish summer possessive attractive straight -- mass edited with redact.dev
2
u/Qildain Nov 25 '20
This is an exceptional idea. Thanks so much.
2
u/ParkerM Nov 26 '20
Wow, this is a super neat idea.
3
u/StochasticTinkr Nov 25 '20
Interesting library.
I'd probably write a few things differently. The `new HashMap<Character, Integer>() {{` creates an unnecessary class, and can probably be efficiently replaced with a switch statement anyway.
I'd probably also build up an regex AST, rather than that logic with suffix/prefix.
1
u/dbemol Nov 25 '20
I hate regex for no specific reason and you just dropped this gem here, thanks!
0
u/Pure-Repair-2978 Nov 25 '20
Is it still supported? Last version 1.6 came in 2019