Hi all,
Can Any one please tell me which regular expression we can use to validate E-mail address in qtp??
Thnx in advance....
Hi
This is the reg Exp for E-Mail Address
".*@.*\.com"
Thanks
VENKATA
Hi,
For example
if your email Id is in the following format
abc.xyz@pqr.com
then use this :
Code:
(\w+)(\.)(\w+)(\@)(\w+)(\.)(w+)
if your email Id is in the following format
abc_xyz@pqr.com
then use this :
Code:
(\w+)(\_)(\w+)(\@)(\w+)(\.)(w+)
if your email Id is in the following format
abc.xyz@pqr.com or abc_xyz@pqr.com or abc-xyz@pqr.com
or abc@pqr.com
then use this :
Code:
((\w+)(\.|\_|\-)(\w+)|(\w+))(\@)(\w+)(\.)(w+)
Thanks,
Raja
Hi Ganesh,
Use this below Regular Expression pattern to match any valid email id.
Code:
sPattern="\b[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}\b"
Thanks,
Azeem
Code For Regular Expression Try This
"^[0-9a-z*()_+%$#@!^&*=+./\}{]+@[a-z]+\.[a-z]{2,3}$"
I think the issue is addressed. I agree with Vijay Kumar over there. That code worked for me with the given issue. You should try this as well