
September 19th, 2012, 07:17 PM
|
 |
Contributing User
|
|
|
|
|
I avoid writing complicated regular expressions, preferring instead a divide-to-conquer approach.
Another good thing to avoid---the ill-defined problem.
Perhaps you could write in Backus-Naur form what you consider a valid address?
Perhaps you could use the popular regular expression, and if it fails prepend www. , try again.
__________________
[code] Code tags[/code] are essential for python code!
|