Closed al6x closed 3 years ago
There's different ways regex libraries threat the . character. Like if newline flag is set on or off. The snippet from the docs of nim-regex
.
nim-regex
. any character except new line (includes new line with s flag)
I personally find it more confusion than help (like the need to use [\s\S] in JavaScript).
[\s\S]
Wouldn't it be better to make it more consistent? And make the . to consistently and always match ANY character?
Yes, but this library keeps compatibility with PCRE as much as possible,
There's different ways regex libraries threat the
.
character. Like if newline flag is set on or off. The snippet from the docs ofnim-regex
I personally find it more confusion than help (like the need to use
[\s\S]
in JavaScript).Wouldn't it be better to make it more consistent? And make the
.
to consistently and always match ANY character?