regex street address match

前端 未结 4 588

While I know that matching a street address will never be perfect I\'m looking to create a couple of regex statements that will get close most of the time.

I\'m tr

4条回答
  •  一整个雨季
    2020-11-29 09:49

    This works for me!

    if(address.match(/^\s*\S+(?:\s+\S+){2}/)) {
       console.log('good address!')
    }
    

提交回复
热议问题