0
From text in XML format:
<shipto
attr="xpto">
<name>Nordmann</name>
<address>Langgt 23</address>
<city>4000 Stavanger</city>
</shipto>
I want to get the match of:
<shipto attr="xpto">
<name>Nordmann</name>
<address>Langgt 23</address>
<city>4000 Stavanger</city>
</shipto>
That is, the content between <
or ></
and the char >
.
If possible, please [Edit] the question and add the language you are using, because each one implements regex in one way and what works in one may not work in the other (and also put what you have tried). Anyway, regex is not always the best tool to mess with XML/HTML, usually it is better to use a lib or parser specific (that most languages have)
– hkotsubo
Besides, if you just want "what’s in between
<
and>
", then<name>
and</name>
should not be in pouch separate? Or have different rules for when the tag has other tags inside it? When [Edit] the question, take the opportunity to clarify these criteria...– hkotsubo
thanks, in fact what I needed was a parser: parseFromString("...", "text/xml");
– David Domingues