View Single Post
  #118 (permalink)  
Old 08-05-2009, 05:58 AM
gracedman gracedman is offline
Special Member
 
Posts: 130
Default Regex revision

Hello, all. The regex I proposed earlier does not account for dots, dashes, or commas after +CountryCode. This one does and seems to be handling UK and Australian numbers as well as US ones:

(?:\s|^)(?:\+\d{1,3}(?:\s|\.|\-|\,)?)?(?:\(\d{1,4}\))?\s?\d{1,11}(?:(?:\-|\.|\,|\s)\d{1,10}){0,3}\s?$

Take care - John
__________________
www.spiritualoutreach.com
Making Christianity intelligible to secular society
Reply With Quote