I’m not an expert with Lua patterns and when I want to do some pattern matching, I usually go by with trial and error.
However, I finally met a match I couldn’t match (no pun intended )
Lets say I have a html string like this stored in a variable:
local html = "<a class='dog' href="https://www.example.com/lost_dog.png">I am looking for my dog</a>"
Now, I want to replace the “dog” that is NOT enclosed with
> with “cat”.
Is such even possible with Lua?