Сергей Бучко Сергей Бучко - 1 year ago 109
C# Question

Combining regular expressions c#

I'm trying to make simple email validation by myself. And I need to combine two patterns:


// allows only xxxx@xxx.xx and dot is not the first or last charachter of local and domain part

// there must not be two or more dots in a row.

In other words, I want to add to the first regex a condition that
is true, but
is false.

vks vks
Answer Source

Just add a lookahead for the same.

See demo.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download