aboutus aboutus - 7 months ago 23
Javascript Question

Regex to don't allow dots in email at wrong position

I have to validation emails from a company. The regex should validate if it come from the company and could come from John.

My regex looks like this now:


The only problem, it's allows dots in wrong place.
I see valid this emails:


But i shouldn't see valid these:


Jay Jay
Answer Source


This should make sure that characters before/after (john) don't start/end with a . respectively.