I need help /prog/. how can I write a regular expression in python that will find all matches for N regular expressions and perform a customized replacement for each given expression? I can't iterate the substitutions one after the other because the replaced strings will be matched.
tldr; I need to lex in python. How can I using the standard library?