Re: Can't figure the regex

2007-10-25 Thread Randal L. Schwartz
> ""Jeff" == "Jeff Pang" <[EMAIL PROTECTED]> writes: "Jeff> There is an article on internet "How to Find or Validate an Email Address". "Jeff> I didn't check it carefully,but just a reference for you. "Jeff> http://www.regular-expressions.info/email.html Don't refer to it again, except as an

Re: Can't figure the regex

2007-10-24 Thread Jeff Pang
On 10/24/07, Anuradha Uduwage <[EMAIL PROTECTED]> wrote: > since i have never seen a > domain address with 5 characters. > Not only 5 characters,but 6 characters are permitted.like these: .museum--Museums .travel--Travel related businesses -- To unsubscribe, e-mail: [EMAIL PROTE

Re: Can't figure the regex

2007-10-24 Thread Anuradha Uduwage
Thanks guys, It took me while but I figured it out... mostly i was confuse with {2,5}. because I thought it should be {2,3} since i have never seen a domain address with 5 characters. On 10/23/07, Jeff Pang <[EMAIL PROTECTED]> wrote: > > Yes,this is a regex for email matching,but may be broken und

Re: Can't figure the regex

2007-10-23 Thread Tom Phoenix
On 10/23/07, newBee <[EMAIL PROTECTED]> wrote: > ^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$ > > Its look like an email address... is it..? It might be somebody's attempt at matching an e-mail address. But it fails to match many valid addresses, while not excluding all invalid ones

Re: Can't figure the regex

2007-10-23 Thread Jeff Pang
Yes,this is a regex for email matching,but may be broken under some cases. The username part can be all a-z,A-Z,0-9, "-", "." and "_" characters. The first tld part (before the ".") take the same character range as username. the last tld part (after the ".") can be a-z and A-Z only,and the length