Regex Must Be Removed

Mar 19, 2025 6:19 PM

typeof

Views

1897

Likes

42

Dislikes

2

humor

lol

programmerhumor

programmer_jokes

funny

It is the black speech, which I will not utter here.

4 months ago | Likes 23 Dislikes 0

https://regex101.com/

4 months ago | Likes 7 Dislikes 0

Fucking love that site

4 months ago | Likes 1 Dislikes 0

Is it bad that I didn't read the title of this post until after I recognized it was a regular expression and started reading it? Do I have brain disease?

4 months ago | Likes 3 Dislikes 0

At least you're not alone, I did the same thing... I've used regular expressions in vim over several decades and I have to remind myself that the script syntax may seem quite foreign to some people.

4 months ago | Likes 2 Dislikes 0

oh, it verifies a valid email address

4 months ago | Likes 24 Dislikes 1

boob@boob.boob

4 months ago | Likes 1 Dislikes 0

+@.+\..+ might work for verifying email. But stackoverflow says the proper way to verify this is by sending a mail with a verification link.

4 months ago | Likes 2 Dislikes 0

It *attempts* to verify an email address, but it's very wrong and will fail.

4 months ago | Likes 12 Dislikes 0

[deleted]

[deleted]

4 months ago (deleted Mar 20, 2025 6:16 PM) | Likes 0 Dislikes 0

It's got a plus on the section checking for bits ending in dots, it ought to be ok with .co.uk I think?

4 months ago | Likes 1 Dislikes 0

[deleted]

[deleted]

4 months ago (deleted Mar 20, 2025 6:16 PM) | Likes 0 Dislikes 0

The dot-detecting element is ([\w-]+\.)+ , which should repeatedly match segments that consist of at least one word character or dash followed by a dot. So it shouldn't match blah....com, but I think it would match -.-.-.-.-.com. At least I think that's how it works, I don't use \w a whole lot when I do regexes.

4 months ago | Likes 1 Dislikes 0

Some valid addresses, it misses some.

4 months ago | Likes 18 Dislikes 0

Lots of valid addresses get missed. But that may be for the better... Unless you want a visit from this guy https://youtu.be/JERBqoTllaE

4 months ago | Likes 3 Dislikes 0

It misses A LOT. All the ones with TLDs longer than four characters, for starters.

4 months ago | Likes 9 Dislikes 0

It may have validated an email at one time, but they keep moving the goal posts.

4 months ago | Likes 2 Dislikes 0

No goalpost moving required: That RegEx wouldn't even validate all valid addresses as defined in RfC 822 from 1982.

4 months ago | Likes 2 Dislikes 0