0
With removing several <br />
end of text in ASP 3.0 only?
Texto <br /> texto texto texto <br /><br /><br /><br />
0
With removing several <br />
end of text in ASP 3.0 only?
Texto <br /> texto texto texto <br /><br /><br /><br />
0
I made a routine with PHP and from there I tried (more than 15 years I abandoned Asp) the equivalent in ASP.
I just couldn’t test in SP because my server doesn’t support, and I couldn’t find it online to test the code in SP.
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
in a string array through the delimiter <br />
.FOR
, starting at 0 (every Asp array starts at zero position), traverse the array to its last position, which is obtained through the function Ubound
<br />
with the function Right
mid
the part of the string that matters. Browser other questions tagged asp
You are not signed in. Login or sign up in order to post.
Yes, it will work, I will do a function and apply it to the maches string of that regex, which I am in the fight. rs Mixed darn, but now it will. You have regex in Asp, regex in javascript, and regex for that function to remove brs. Let’s see what I can do. Thanks
– Rod
Rode, almost went. If the brs are in the same line br br br br the strip function, only the damn ckeditor in the question, generates the br one below the other.
– Rod
@Rod, have you tried
Replace(texto, Chr(13), "")
– user60252