Just add this negative lookahead just after your ^
(?!.*(?:''|\.\.))
How does this work?
(?!.*(?:''|\.\.))
is a negative lookahead that asserts: at the present position (which is the beginning of the string), we cannot match any character followed by either two apostrophes or two dots.
Other tweaks
Since that is not the question, I haven't analyzed the rest of your regex. However, at a glance:
{1,}
can just be written as +
- Your initial
[\w-\.\']
means that an email can start with a dot (among other characters). Are you sure that is valid? If not, start your match with exactly one character from the allowable set, then only add the quantified set.
- The
{2,3}
at the end is okay for TLDs such as com
and us
. But are you sure you want to exclude TLDs such as mobi
?
The Wheel
For reference, here are examples of "the wheel" that has already been invented. These are two email expressions from the RegexBuddy library.
\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}\b
RFC2822:
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])