I\'ve been trying to match the following string:
string = \"TEMPLATES = ( (\'index.html\', \'home\'), (\'base.html\', \'base\'))\"
But unfo
Your sample is looking for open paren followed by zero or more letter w followed by close paren. You probably want to use \w instead of w, but that won't work in your case anyway, because you have non-word characters next to the open paren.
I think you should consider splitting the string at the commas instead. What is your final objective?