Re:Tell HN: After 10 years of experiments, custom username e...
by wiml on Tuesday August 16, 2022 @12:59AM
(#32479359)
It makes the preceding * less "greedy". I don't think it has any effect on the set of strings matched by this regexp, though, which is a simple string suffix check.
[ Parent
| on HN ]
Re:Tell HN: After 10 years of experiments, custom username e...
by jakopo87 on Tuesday August 16, 2022 @03:21AM
(#32480112)
I agree, but the dot should be escaped because it matches any character, so "@domain\.com$" should just works for.
Re:Tell HN: After 10 years of experiments, custom username e...
by jasonm23 on Tuesday August 16, 2022 @06:14AM
(#32481058)
Or use [.] so it's super clear on the a-human-is-reading-it parse.
Re:Tell HN: After 10 years of experiments, custom username e...
by account42 on Wednesday August 17, 2022 @09:42AM
(#32496247)
I don't think that's clearer because for [.] I need to remember that . does not need to be escaped in character classes whereas \. is quite clearly an escaped literal character without any advanced regexp knowledge.