Question: I'm developing a asp.net application and I use some components. I have a component with a resource file with a lot of keys in English. I need to translate it to Portuguese (Brazil, pt-br). I would like to know, if is there any way to translate it with a program? Or if is there a program that do this?

Thanks

Answer: 
Assuming "some patterns" means "single words between double {}'s":

import re

re.findall('{{(\w\*)}}', string)

Edit: Andrew Clark's answer implements "any sequence of characters at all between double {}'s"
A regex-based solution is fine for your example, although I would recommend something more robust for more complicated input.

```
import re

def match_substrings(s):
    return re.findall(r"{{([^}]*)}}", s)

```

The regex from inside-out:

`[^}]` matches anything that's not a '}'  

`([^}]*)` matches any number of non-} characters and groups them  

`{{([^}]*)}}` puts the above inside double-braces

Without the parentheses above, `re.findall` would return the entire match (i.e. `['{{is}}', '{{text}}']`. However, when the regex contains a group, findall will use that, instead.