I am having some issues with the following python. I am trying to match strings that are inside single quotes, but only capture the contents, that is, drop the single quotes themselves.
In [144]: tststr = "'hello'"
In [145]: res = re.search(r"'(.*)'", tststr)
In [146]: res.group()
Out[146]: "'hello'"
I would expect the output to only contain "hello" without the single quotes.
Thanks for your help!