Question 1:
For example,
... "ab'cd" ... 'ab"cd' ...
It should get ab'cd and ab"cd respectively. There may be many quoted strings.
Question 2:
And how to extract text <td>...</td> text from the following string?
<abc>text <td>...</td> text</abc>
<xyz>text <td>...</td> text</xyz>
<def>text <td>...</td> text</def>
abc, def, xyz may be nested in <td>.
I figured it out – using back reference.