Hi, all
The task is to strip HTML code, make a plain text from it.
There is a code on JavaScript:
How to make such "replace" using RegEx ?
Other variants of code.
The task is to strip HTML code, make a plain text from it.
There is a code on JavaScript:
B4X:
str = '**ANY HTML CONTENT HERE**';
str=str.replace(/<\s*br\/*>/gi, "\n");
str=str.replace(/<\s*a.*href="(.*?)".*>(.*?)<\/a>/gi, " $2 (Link->$1) ");
str=str.replace(/<\s*\/*.+?>/ig, "\n");
str=str.replace(/ {2,}/gi, " ");
str=str.replace(/\n+\s*/gi, "\n\n");
How to make such "replace" using RegEx ?
Other variants of code.