I have an HTML string (in German) like this:
<li>Peter Goldberg Dr. , Brünner Straße 19, A-1210, Tel +43-1-1234567 (N)</li>
It consists of 3 parts:
- name of the person ("Peter Goldberg Dr.")
- the address of the person ("Brünner Straße 19, A-1210")
- and the tel no of the person or simply the rest of the string ("Tel +43-1-1234567 (N)")
I need to split the whole string into these 3 components without the HTML list tags <li> and </li>.
I am trying it with Pattern and Matcher classes, but I am doing something wrong for sure.
Pattern myPattern = Pattern.compile("<li>.+,.+Tel.+</li>");
Matcher mat = myPattern.matcher(eingabe[0]);
while (mat.find()) {
System.out.println(mat.group(0));
}
Could someone please help?
Thanks a lot!!

Tel? Can the person's name or telephone number have a comma in it? Depending on the answers to those questions, the posted answers may not be correct.