I'm trying to detect if a particular address corresponds to a Brazilian highway.
For example, br-101
matches.
My initial plan was to list the state acronyms (mg, sp, rn ...) plus the abbreviation br, and write something like /sigla1-[0-9]{3}|sigla2-[0-9]{3}.../
.
But a wikipedia query gave me a surprise: there are other prefixes besides states. (for example, prc
, in link )
I ask, then, which is the most correct way to detect the highways?
We can get (duas_ou_tres_letras)-(tres_numeros)
, for example. Does the part before the hyphen have necessarily two or three letters? the part after the hyphen can have less than three numbers?
Would anyone have a list of possible acronyms that might come before the hyphen?