Regular expressions have never been something I would call a strength and Lua’s pattern matching is even harder for me to figure it out (though it’s probably simpler).
Anyway, I have a string of text that may contain an anchor tag and URL:
blah blah blah [text]Some Text[/text] blah blah blah.
I want to remove the link, leaving the text.
Here is the code I’m trying to use:
[lua]storyBody = story.content_encoded:gsub("(%w+)", “%1”)[/lua]
It is not stripping the text.
Any help on the right pattern to find [text]XXXXX[/text] and leave me XXXX?
[import]uid: 19626 topic_id: 15001 reply_id: 315001[/import]