Steven Levithan
Steven Levithan
I'm guessing you already understand Unicode much better than me, but in case it's helpful, what JavaScript seems to do when both the `i` and `u` (or `v`) flag are...
Using the running time for benchmarking in that way is probably a bad idea, and will mislead you in many ways. Regex performance is dependent on many things, and is...
> Another thing: PCRE2 doesnt add steps for the addition of non-capturing groups `(?:`, but on Javascript having them gives a clear match-time speed boost > [...] What i was...
Yes, this is a flavor request. Oniguruma is a powerful regex engine/flavor but has quite a few differences from PCRE, including lots of edge cases that work differently. Note that,...
@firasdib regex101 could support Oniguruma using only JavaScript (without running a new server backend for it) by using either one of the following libraries: - [oniguruma-to-es](https://github.com/slevithan/oniguruma-to-es), an incredibly robust/accurate Oniguruma...
Quoting from [#351](https://github.com/kkos/oniguruma/issues/351#issuecomment-2818389363), since this detail was more relevant here: > JS also ensures that `/\w/iu` is the inverse of `/\W/iu`. This is relevant since JS's `\w` is ASCII-only `[0-9A-Z_a-z]`,...
Thanks! A PR would be welcome. It could work by passing flag `x`, since there's an `x` flag [proposal](https://github.com/tc39/proposal-regexp-x-mode) for future versions of JavaScript.
Those are all reasonable, but I'd make a few points in response. > Developers have to look at the plugin first before they can fix, improve or add a regex...
Another example for the fun of it... Valibot's `IP_REGEX` (from [here](https://github.com/fabian-hiller/valibot/blob/main/library/src/regex.ts)) uses the following monstrosity: `/^(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])(?:\.(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])){3}$|^(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:|(?:[\da-f]{1,4}:){1,6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,5}(?::[\da-f]{1,4}){1,2}|(?:[\da-f]{1,4}:){1,4}(?::[\da-f]{1,4}){1,3}|(?:[\da-f]{1,4}:){1,3}(?::[\da-f]{1,4}){1,4}|(?:[\da-f]{1,4}:){1,2}(?::[\da-f]{1,4}){1,5}|[\da-f]{1,4}:(?::[\da-f]{1,4}){1,6}|:(?:(?::[\da-f]{1,4}){1,7}|:)|fe80:(?::[\da-f]{0,4}){0,4}%[\da-z]+|::(?:f{4}(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d)|(?:[\da-f]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d))$/iu;` Here is the same regex if we used the [`regex`](https://github.com/slevithan/regex) package or its Babel...
> Would you be interested in becoming Valibot's Head of Regex? 😎 If you are interested, I would contact you to request a review whenever we add or change a...