Looks like valid set notation so you could use the ast module to parse it instead:
import ast
mystr = 'myString={"name", "age", "address", "contacts", "Email"}'
tree = ast.parse(mystr)
name = tree.body[0].targets[0].id
values = [val.s for val in tree.body[0].value.elts]
print name, values
# prints: myString ['name', 'age', 'address', 'contacts', 'Email']
EDIT: In light of the actual format of the input file, I would use a regex to parse out the block and then parse the block as above, or as bellow to just strip off the quotes:
import re
block_re = re.compile(r'v_dims=\{(.*?)\}', re.S)
with open("C:\XXXX\nemo\Test.mrk") as f:
doc = f.read()
block = block_re.search(doc)
[s.strip().strip('"') for s in block.group(1).split(',')]
But probably the best way is to combine the two:
import ast
import re
with open("C:\XXXX\nemo\Test.mrk") as f:
doc = f.read()
block_re = re.compile(r'v_dims=\{.*?\}', re.S)
tree = ast.parse(block_re.search(doc).group(0))
print [val.s for val in tree.body[0].value.elts]
# ['name', 'age', 'address', 'contacts', 'Email']
$before the closing brace in your regular expression?