You have to provide the string you're matching:
import re
line = "# SomeKey: Value Is A String"
mg = re.match(r"# ([^:]+): (.*)", line)
>>> print mg.group(1)
SomeKey
>>> print mg.group(2)
Value Is A String
Or to automatically get a tuple of key and value, you can do:
import re
line = "# SomeKey: Value Is A String"
mg = re.findall(r"# ([^:]+): (.*)", line)
>>> print mg
[('SomeKey', 'Value Is A String')]
For names, you would do:
mg = re.match(r"# (?P<key>[^:]+): (?P<value>.*)", line)
print mg.group('key')