Opps again. Catching US phone#'s. split into two sections, one with spaces/special characters over 10 digits, one w/ no spaces over 10 digits.
I'm sure Micheal will come up with something much more elegant, but until then: tel\W*\W*\W*\W*\(?\d\d\d?\d?\d?\)?(-|\s)\(?\d\d\d?\d?\d?\)?(-|\s)\(?\d\d \d?\d?\d?\)?(-|\s)\(?\d\d\d?\d?\d?\)? tele\W*\W*\W*\W*\(?\d\d\d?\d?\d?\)?(-|\s)\(?\d\d\d?\d?\d?\)?(-|\s)\(?\d\ d\d?\d?\d?\)?(-|\s)\(?\d\d\d?\d?\d?\)? phone\W*\W*\W*\W*\(?\d\d\d?\d?\d?\)?(-|\s)\(?\d\d\d?\d?\d?\)?(-|\s)\(?\d \d\d?\d?\d?\)?(-|\s)\(?\d\d\d?\d?\d?\)? telephone\W*\W*\W*\W*\(?\d\d\d?\d?\d?\)?(-|\s)\(?\d\d\d?\d?\d?\)?(-|\s)\ (?\d\d\d?\d?\d?\)?(-|\s)\(?\d\d\d?\d?\d?\)? tel\W*\W*\W*\W*\d\d\d\d\d\d\d\d\d\d\d\d?\d?\d?\d?\d? tele\W*\W*\W*\W*\d\d\d\d\d\d\d\d\d\d\d\d?\d?\d?\d?\d? phone\W*\W*\W*\W*\d\d\d\d\d\d\d\d\d\d\d\d?\d?\d?\d?\d? telephone\W*\W*\W*\W*\d\d\d\d\d\d\d\d\d\d\d\d?\d?\d?\d?\d? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dickson, Paul Sent: Wednesday, August 09, 2006 12:42 PM To: Questions and Answers for users of ASSP Anti-Spam SMTP Proxy Subject: Re: [Assp-user] blackre for non us telephone numbers. I couldn't get that to work, although I added tel, telephone, etc etc each with their own line, so I may have been doing something wrong. I just modified my last post to account for no spaces and a more diverse spacing scheme w/ more or less #'s. I think the preceeding tel, etc makes it fairly reliable. Time shall tell. tel\W*\W*\W*\W*\(?\d\d\d?\d?\d?\)?(-|\s)?\(?\d\d\d?\d?\d?\)?(-|\s)?\(?\d \d\d?\d?\d?\)?(-|\s)?\(?\d\d\d?\d?\d?\)? tele\W*\W*\W*\W*\(?\d\d\d?\d?\d?\)?(-|\s)?\(?\d\d\d?\d?\d?\)?(-|\s)?\(?\ d\d\d?\d?\d?\)?(-|\s)?\(?\d\d\d?\d?\d?\)? phone\W*\W*\W*\W*\(?\d\d\d?\d?\d?\)?(-|\s)?\(?\d\d\d?\d?\d?\)?(-|\s)?\(? \d\d\d?\d?\d?\)?(-|\s)?\(?\d\d\d?\d?\d?\)? telephone\W*\W*\W*\W*\(?\d\d\d?\d?\d?\)?(-|\s)?\(?\d\d\d?\d?\d?\)?(-|\s) ?\(?\d\d\d?\d?\d?\)?(-|\s)?\(?\d\d\d?\d?\d?\)? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Micheal Espinola Jr Sent: Wednesday, August 09, 2006 11:54 AM To: Questions and Answers for users of ASSP Anti-Spam SMTP Proxy Subject: Re: [Assp-user] blackre for non us telephone numbers. Dickson, Paul wrote: > Lol.. that catches IP's.. nevermind:) :DERP: > > So, based on those results, I made this simple regex > > \d\d\W\d\d\d\W\d\d\d\W\d\d\d How about: (\d\d\W\d\d\d\W\d\d\d\W\d\d\d)(?!(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0- 9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)) This should match your number, as long as it inst a valid IP address. Whatever you come up with as a suitable match, negating the matching of an IP4 address might be useful as a check. ------------------------------------------------------------------------ - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Assp-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/assp-user ------------------------------------------------------------------------ - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Assp-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/assp-user ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Assp-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/assp-user
