What I want to do is to extract all values between single or double quotation marks.
Let's say I have the following values.
"Alice's Adventures in Wonderland 1"
"Alice's 'Adventures' in Wonderland 1"
"Alice's "Adventures" in Wonderland 1"
"Alice's Adventures
in Wonderland 1"
'Alice's Adventures in Wonderland 1'
'Alice's "Adventures" in Wonderland 1'
'Alice's 'Adventures' in Wonderland 1'
'Alice's Adventures in Wonderland 1'
And the desired outputs are:
Alice's Adventures in Wonderland 1
Alice's 'Adventures' in Wonderland 1
Alice's "Adventures" in Wonderland 1
Alice's Adventures
in Wonderland 1
Alice's Adventures in Wonderland 1
Alice's "Adventures" in Wonderland 1
Alice's 'Adventures' in Wonderland 1
Alice's Adventures in Wonderland 1
How should I write the regex (using one regex expression for extracting all the desired values at once) to get the whole texts enclosed in the first and last quotation marks ?
p.s. I want to use re.search(r"...", text)
method