Closed alonshk closed 8 years ago
e.g.:
``` re.search(r'(\w+)\s*=\s*(.+)')
and then you can remove the trailing spaces from the value, but I might use split with '=' instead of this regex.
BTW This solution will also catch items that were commented out:
# name = value
that should be avoided.
if the value of a key has spaces in it as in name = Foo Bar i will get just Foo. What should i do to resolve this ?