Hello Everybody,
I’m trying to validate address field using regular expressions. For most part the line below works except ignoring case. For example rd works but not Rd and I like to rewrite the line below to so that the address validation is NOT case sensitive.
const matchAddress = /\d+(\s+\w+){1,}\s+(?:st(?:\.|reet)?|dr(?:\.|ive)?|pl(?:\.|ace)?|ave(?:\.|nue)?|rd|road|lane|drive|way|court|plaza|square|run|parkway|point|pike|square|driveway|trace|park|terrace|blvd)/;