Looking for something similar to Python’s regex sub or subn methods.
http://docs.python.org/library/re.html
So basically a C/C++ api like this
re.sub(pattern, repl, string, count=0, flags=0)
Where I can put a function pointer for repl like you can in Python.
Take a look at regex_replace
Output: