I want to allow the following pattern: either any number or two numbers with a hyphen between them, so basically a house number.
This works so far but seems a little weird to me: /^(\d)+$|^([\d]+-[\d]+)$/g
This correctly valids "1", "12", "12-13"
and unvalids "-2
" and "12-"