All very true! Note that the OP asked for a loose regex. You can make the regex more and more exact, but that is a decision for the OP.GeertDD wrote:prometheuzz wrote:...
The problem is that now the first part of the email can start and/or end with a dot. One way to prevent this is using lookaround.
...
You can also extend your regex so that there cannot occur two dots in succession, but it would make the regex more and more "voodoo-like" (not for you, but most regex-mortals)
; )
But it's good that you posted a different version of it: now the OP can decide which one to use.