eltmo
(Eltmo)
1
I have theese danish adress’ i need to split/Use regex on.
On the left i have an example of the adress and on the right, the adress i want to return:
Testvej 101a th - Testvej 101
Testvej 101a, 1 th - Testvej 101
Testvej 101, 25 - Testvej 101
Testvej 101. 25a th - Testvej 101
Testvej 1 a th - Testvej 1
St. Testvej 234a - St. Testvej 234
Gl. større Testvej 1 tv - Gl. større Testvej 1
So i need to remove everything after the street name and house number, i need some guidance on how to do this.
Gokul001
(Gokul Balaji)
2
Hi @eltmo
Can you share the Expected Output here
Regards
Gokul
arivu96
(Arivazhagan A)
3
Hi @eltmo,
Try below regex pattern
^\w* [0-9]*
Regards,
Arivu
eltmo
(Eltmo)
4
The expected output is on the right
Yoichi
(Yoichi)
5
Hi,
Can you try the following expression?
System.Text.RegularExpressions.Regex.Match(yourString,"^[.\w\s]+?\d+").Value
Regards,
eltmo
(Eltmo)
6
Thank you, but i need it for all the examples.
eltmo
(Eltmo)
8
It worked on a lot of mathes but i came upon this one, Test. X’s vej 2, 6. th. - where it dosnt work
Yoichi
(Yoichi)
9
Hi,
How about the following?
System.Text.RegularExpressions.Regex.Match(yourString,"^.+?\d+").Value
Regards,
system
(system)
Closed
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.