Withdrawing multiple% w / w% of end-of-text in ASP 3.0?
Texto <br /> texto texto texto <br /><br /><br /><br />
Withdrawing multiple% w / w% of end-of-text in ASP 3.0?
Texto <br /> texto texto texto <br /><br /><br /><br />
I did a routine with PHP and from there I tried (over 15 years I left asp) the equivalent in ASP.
I just can not test in asp because my server does not support, nor did I find online to test the code in asp.
texto="Texto <br /> texto texto texto <br /><br /><br /><br />"
'transforma em array
partes = Split(texto, "<br />")
For i = 0 to Ubound(partes)
comprimento = Len(texto)
If (Right(texto,6)=="<br />" Then
texto=mid(texto,1,(comprimento-6))
Else
Exit For
End If
Next
response.write texto
Split
transform texto
into an array of strings through the <br />
delimiter. FOR
, starting at 0 (all arrays in asp start at position zero), scroll the array to its last position, which is obtained through the function Ubound
<br />
with the function Right
mid
function to the part of the string that matters.