Hi all,
is there a quick solution to "clean" a string removing all html tags to got a plain text without any tag (see example) ?
For this specific string the fastest solution is...
But this is good only for this specific string, if the tags change it is no longer guaranteed that the string is text without HTLM.
So wich is the best solution in this case ?
1) regex (is there any pattern to remove all HTML tags) ?
2) HTML parser (parsing the tags to extract the text) ?
is there a quick solution to "clean" a string removing all html tags to got a plain text without any tag (see example) ?
B4X:
<p class="text-align-justify">Multibrand giovane con i migliori marchi come....</p>
For this specific string the fastest solution is...
B4X:
'str is the above string
str.Replace($"<p class="text-align-justify">"$, "").Replace($"</p>"$, "")
But this is good only for this specific string, if the tags change it is no longer guaranteed that the string is text without HTLM.
So wich is the best solution in this case ?
1) regex (is there any pattern to remove all HTML tags) ?
2) HTML parser (parsing the tags to extract the text) ?