can someone write a regex in C# for me to verify the following emails ?
aa@bb.com;cc@dfs.com;asdf@fasdf.com;sdfsdf@fsaf.com;
every email addresses are seperated with “;”, and I have wrote the following regex:
^(([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9});)*$
when use this regex to match a string, it might cause a dead loop, why ?
Thanks in advance!
Your regular expression suffers from catastrophic backtracking. I added atomic groups to your regular expression to create this: