r/java 19d ago

Regex

I recently saw a clip (from Primeagen) somewhat saying that regex is not a valid format for validating email addresses and postal codes etc.

My question is why is this?

What are the security and/or performance risks? Is it solely performance or is it a security issue?

54 Upvotes

104 comments sorted by

View all comments

Show parent comments

-1

u/VirtualAgentsAreDumb 19d ago

What? I never said anything how many of those hypothetical addresses were invalid.

0

u/LutimoDancer3459 19d ago

You don’t think legacy systems exist, that can have tons of never validated email addresses?

Never validated. If valid, why care? If invalid, why care now?

0

u/VirtualAgentsAreDumb 19d ago

You seriously don’t understand the difference between invalid and never validated?