I am trying the following:
s = "Text text text [123] ['text']"
This is my function:
def getFromSquareBrackets(s):
m = re.findall(r"\[([A-Za-z0-9_']+)\]", s)
return m
But I am obtaining:
['123', "'text'"]
I want to obtain:
['123', 'text']
How can I ignore the single quotes?