Kreatus (Ubot Ninja) 422 Posted March 24, 2011 Report Share Posted March 24, 2011 How can I match all these different addresses using regex? 1 S Park Street # 2 Madison, WI 53715-1375 2850 W 95th Street # 210 Evergreen Park, IL 60805-2734 2632 East 14th Street Brooklyn, NY 11235 4887 E. St. Louis Ave Las Vegas, NV 89104 217 Division Avenue Eugene, OR 97404 16324 Via Venetia West Delray Beach, FL 33484 43 Golden Drive Bedford, NH 03110-4415 599 South Hamilton Road Columbus, OH 43213 Thanks Quote Link to post Share on other sites
Praney Behl 314 Posted March 24, 2011 Report Share Posted March 24, 2011 Try this : ^[a-zA-Z\d]+(([\'\,\.\- #][a-zA-Z\d ])?[a-zA-Z\d]*[\.]*)*$ Praney Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted March 24, 2011 Author Report Share Posted March 24, 2011 Thanks for the try praney. But when I put extra characters at the end of each lines the regex code match them also. Means all the extra characters will be scraped.. I want to get only the addresses without any extra characters. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.