For example:
local StringToAction = "TESTING <script></script>" -- Using httpservice as an example
I would like to remove the tags whilst also removing their inner content.
For example:
local StringToAction = "TESTING <script></script>" -- Using httpservice as an example
I would like to remove the tags whilst also removing their inner content.
Using this:
local StringToAction = "Testing <script></script>"
local start, temp1 = StringToAction:find("<script>")
local temp2, endS = StringToAction:find("</script>", temp1)
local CleansedString = StringToAction:sub(1, start - 1) .. "" .. StringToAction:sub(endS + 1, StringToAction:len())
This discussion is preserved as it was. New answers, comments, and votes are closed.
5 comments
The code provided seems to only remove "Testing" instead of the HTML.
Woops, sorry, forgot a 1. Let me edit the post.
Try it now.
It works now, thanks. [Please edit "end" inside your answer to be "endd" or something else in-case an amateur doesn't find that error.]
Haha, didn't even notice that meself, thanks.