I have the following string data:
data = "*****''[[dogs and cats]]''/n"
I would like to use regular expressions in python to extract the string. All the data is encapsuled in the double quotes ” “. What are the wildcards that I use so I can get the following:
print data.groups(1)
print data.groups(2)
print data.groups(3)
'dogs'
'and'
'cats'
Edit: So far I have something a long the lines of this
test = re.search("\\S*****''[[(.+) (.+) (.+)\\S]]''", "*****''[[dogs and cats]]''\n")
print test.group(1)
Some people, when confronted with a problem, think, “I know, I’ll use regular expressions.” Now they have two problems.” Jamie Zawinski