I am learning some regular Expressions.
Now am I trying to get the street and the house number out of a string.
So this is my string "Driesstraat(Ide) 20". Driesstraat is the street name. (Ide) is an acronym for the municipality. 20 is the house number.
let re = /^(\d*[\p{L} \d'\/\\\-\.]+)[,\s]+(\d+)\s*([\p{L} \d\-\/'"\(\)]*)$/iu
let match = adresInput.value.match(re)
if (match){
match.shift();
console.log(match.join('|'));
}
The above code works when their is no (Ide). I get this string out of a Belgian Eid reader.
thank you in advance