I'm attempting to use the Python re.sub module to replace any instance of false in the example below with "false, \n"
local Mission = {
start_done = false
game_over = false
} --End Mission
I've attempted the following, but I'm not getting a successful replacements. The idea being I start and end with the anchor strings, skip over anything that isn't a "false", and return "false + ','" when I get a match. Any help would be appreciated!
re.sub(r'(Mission = {)(.+?)(false)(.+?)(} --End Mission)', r'\1' + ',' + '\n')