Hello,
I am currently working on a php script to parse a list of addresses. I need to ensure that the addresses have a specific format as follows:
2 or 3 lines of text, followed by a blank line, followed by a phone number.
basically I am doing a search on yellowpages.com, doing a copy+paste into a form and then filtering out the junk I don't want.
For the most part it works, however I would like to make it better.
An example input would be:
Consider this an array where each "----" separates the values.
Business name One
address line 1
address line 2
(555) 555-1212
Business name Two
address
address
(555) 555-1212
Business name Three
address
address
(555) 555-1212
Business name Four
address
address
(555) 555-1212
Business name Five
address
address
(555) 555-1212
Business name Six
address line one
(555) 555-1212
The idea is that I want to be sure that what I have is actually an address, but I am not sure how to do it with regex.
edit by admin: do not post anything to the forum that you don't want search engines to find. You won't be able to remove it later.
Edit by me: The information posted is already available online. I retrieved it from the yellowpages.com. I never post things I don't want found. (besides that what are you implying?)