"Christopher Spears" <[EMAIL PROTECTED]> wrote > create a regular expression that will match a street > address. Here is one of my attempts. > > Obviously, I can just create a pattern "\d+ \w+ \w+". > However, the pattern would be useless if I had a > street name like 3120 De la Cruz Boulevard. Any > hints?
Yes, don't go too far. Matching addresses is a fantastically difficult thing to do perfectly. There are several companies whose only product is software to match and check addresses and they sell it for hundreds of thousands of dollars a license! They spend years developing and improving it. Our suppllier is up to version 16 and they only release new versions every 2 years... Of course they are matching formats from countries around the world and providing GUI management consoles and MIS reports etc etc. But the core function of correctly identifying valid addresses remains a hugely complex task. Its a good idea to try just enough of it to realise how hard it is. Then stop. :-) HTH, -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor