Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Aloso
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
Pomsky, a language transpiled to regular expressions, now with unit tests
(pomsky-lang.org)
3 points
by
Aloso
3y ago
|
0 comments
2.
▲
by
Aloso
4y ago
(Author of rulex here) It's a middle ground, actually: When compiling a rulex, you specify the target regex flavor. Some features (e.g. lookaround and backreferences) aren't supported in every flavor. Some features are polyfilled
3.
▲
by
Aloso
4y ago
(Author of rulex here) Creating rulex has been quite a journey, during which I learned a lot about regex syntax, its quirks, and the differences between various regex flavors. I already knew a lot about regexes before I started this project
4.
▲
by
Aloso
4y ago
> But is that what it is supposed to be for? (Author of rulex here) Yes, rulex is compiled to a regex. You can use it with the CLI or the online playground and insert the result into your source code. Eventually, I'd like to have a
5.
▲
by
Aloso
4y ago
When compiling a rulex to a regex, you specify the regex flavor, so the resulting regex is compatible with that regex flavor. This is significant because PCRE, .NET, Ruby, Python, JavaScript, etc. all use slightly different syntax, but you
6.
▲
by
Aloso
4y ago
Note that rulex replaces the named backreference with a numeric one. Named backreferences are much easier to work with, because you don't have to count capturing groups, which is error-prone and complicates later modifications. An more