Hi
im trying to find iframe tags in a string and append an empty line after them
the prevous code is logging
but it should log
it regex replace not working or im doing something worng ?
im trying to find iframe tags in a string and append an empty line after them
B4X:
Log(RegexReplace("(<iframe.*<\/iframe>)", "sometext<iframe-sometext-</iframe>sometext", "$1" & "<br>"))
Sub RegexReplace(Pattern As String, Text As String, Replacement As String) As String
Dim m As Matcher
m = Regex.Matcher(Pattern, Text)
Dim r As Reflector
r.Target = m
Return r.RunMethod2("replaceAll", Replacement, "java.lang.String")
End Sub
the prevous code is logging
sometext<iframe-sometext-</iframe><br>sometext
but it should log
<iframe-sometext-</iframe>
it regex replace not working or im doing something worng ?
Last edited: