Re:Regex character "$" doesn't mean "end-of-string"
by dumbo-octopus on Wednesday March 20, 2024 @01:45PM
(#39769840)
I wonder whether simply (regex) replacing a sequence of .'s with a single one as part of a post-processing step would be effective.
[ Parent
| on HN ]
Re:Regex character "$" doesn't mean "end-of-string"
by layer8 on Wednesday March 20, 2024 @02:11PM
(#39770116)
That would be bad form, IMO. The user may have typed [email protected] by mistake instead of [email protected], and now you’ll be sending their email to [email protected]. Similar for leading or trailing dots. You can’t just decide what a user probably meant, when they type in something invalid.