Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mail ID using Regular Expression
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi..
Since you have asked this under Regular expression...We can do as given below...

Code:
Set myReg = New RegExp
myReg.Global = True
myReg.IgnoreCase = True

myReg.Pattern = "[a-z0-9]{2,7}@gmail.com" ' Here i just assumed that before @ we can have 2 min chars and max 7 chars. If u need 'to have only 7 then wirte like {7}

'returns true as no of chars 4
msgbox myReg.Test("test@gmail.com")

'returns false. as 1 char
msgbox myReg.Test("t@gmail.com")
Reply


Messages In This Thread
Mail ID using Regular Expression - by asisha - 03-09-2011, 10:22 PM
RE: Mail ID using Regular Expression - by vIns - 06-07-2011, 06:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
At Regular Expressions for e-mail address ganesh.dengale 6 19,191 08-23-2022, 02:51 PM
Last Post: ahmad3029
  Need Any digit in xpath path using Regular expression Priyam 1 3,495 10-05-2016, 11:05 AM
Last Post: Ankur
  Regular expression to read two words in lowercase, uppercase and with and without spa sarahq49 1 3,361 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 3,830 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 16,577 12-08-2014, 06:38 PM
Last Post: anshika.agarwal

Forum Jump:


Users browsing this thread: 1 Guest(s)