I am processing addresses into their respective field format for the database. I can get the house number out and the street type but trying to determine best method to get the
You can play fast and loose with named capture groups in a regex
matches = res[:address].match(/^(?\S*)\s+(?.*)\s+(?.*)$/)
number = matches[:number]
house = matches[:name]
street_type = matches[:type]
or if you wanted your regex to be a little more accurate with the type you could replace
(?
with
(?
and add all the different options you'd want