Regex pattern
-
Hi Experts, The below given is the Regex pattern for validating e-mail. I have to do it in 2 ways one is through UI and another one is through excel import. In UI i am using the same Regex pattern as given below using regularexpressionvalidator. It is correctly validation "sam@ple@code.com" and "'sam@ple@code.com'" - @@ and '' are correctly restricted in UI but when i use the same in code it is not validationg the given 2 email ids and allowing me to insert. how to avoid double @ and single quoted. i want the Regex pattern. can anyone help me in this? UI- working fine === ValidationExpression="\w+([-+.']\w+([-]*))*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Inside code - not working for double @ and ' ============ Regex patternMatch = new Regex("\\w+([-+.']\\w+([-]*))*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");//("(\\d|-| | )*");
Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]
-
Hi Experts, The below given is the Regex pattern for validating e-mail. I have to do it in 2 ways one is through UI and another one is through excel import. In UI i am using the same Regex pattern as given below using regularexpressionvalidator. It is correctly validation "sam@ple@code.com" and "'sam@ple@code.com'" - @@ and '' are correctly restricted in UI but when i use the same in code it is not validationg the given 2 email ids and allowing me to insert. how to avoid double @ and single quoted. i want the Regex pattern. can anyone help me in this? UI- working fine === ValidationExpression="\w+([-+.']\w+([-]*))*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Inside code - not working for double @ and ' ============ Regex patternMatch = new Regex("\\w+([-+.']\\w+([-]*))*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");//("(\\d|-| | )*");
Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]
I use this : www.regxlib.com [^], otherwise I'll whittle my life away creating the "perfect" regex :)
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^]