Can anyone explain me how to build Regular Expression for find all the street names and numbers in a string containing multiple addresses

Address: "275 S Wall St., Wilmington, OH, 45177 - Virginia USA, 1223 Pamela St., Leesburg, FL, 34748 - 1022 Lincoln Ave, Duquesne, PA, 15110 - US, 1295 N Opdyke Rd, Auburn Hills, MI, 48326 - 19 Orbit Dr, Enfield, CT, 06082 "

I have mentioned the ScreenShot of RegEx Builder

Try this regex hope it will help you out
\d{0,4}[A-z\s]+(St.|Ave|Rd|Dr)

3 Likes

Try: (\d+)(\s\w*)*.?,

https://regex101.com/ is a good site to test regular expressions

3 Likes

There should be an escape before the period in the regex. It is getting eliminated when I post the reply.

3 Likes

yes this regex works fine go with it

1 Like

Thank You Sir

Yes sir…Thank You