questions - Question:Regex Refinement

I'm trying to parse addresses out of blocks of text, and have the following expression to do so:


It will currently parse addresses such as:

300 E. Randolph St. Chicago, IL >> Returns 300 E. Randolph St.

5553 Bay Shore Drive >> Returns input

23 Joseph E Lowery Boulevard >> Returns input

513 Martin Luther King Jr Boulevard >> Returns input

This is exactly what I want. I was wondering, as this is the first expression I have ever written, if there was a way to shorten down the expression or refine it a little?

asked Sep 13, 2013 in Java Interview Questions by anonymous
edited Sep 12, 2013
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.