<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-br" xml:lang="pt-br">
<head>
<title>Achou, ganhou!</title>
<META HTTP-EQUIV="REFRESH" CONTENT="180; URL=index.php">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="css/style.css" rel="stylesheet" type="text/css" media="all">
</head>
<body>
<div class="fullwrap">
<div class="content">
<h2>Cidade: São Leopoldo</h2>
<h2 style="background-color:#1F2C3E;">Próxima dica entre: 16:10 - 20:00</h2>
<h2> Dica 3: O objeto onde se encontra o dinheiro fica a céu aberto, e não dentro de 4 paredes e um teto.</h2>
</div>
</div>
</body>
</html>
Sub RemoveTags(Text As String) As String
Dim Pattern, Replacement As String
Dim m As Matcher
Pattern = "<[^>]*>"
Replacement = " "
m = Regex.Matcher2(Pattern, Regex.CASE_INSENSITIVE, Text)
Dim r As Reflector
r.Target = m
Return r.RunMethod2("replaceAll", Replacement, "java.lang.String")
End Sub
i m trying
B4X:
dim casa as string
dim xuxu as string
casa = Html 'html is my downloaded site strings
xuxu = RemoveTags(casa) ' try call the sub here with my text
Msgbox(xuxu,"teste")
'edit
ty my code works but only on activity resume
B4X:
dim casa as string
dim xuxu as string
casa = Html 'html is my downloaded site strings
xuxu = RemoveTags(casa) ' try call the sub here with my text
Msgbox(xuxu,"teste")