Given the following string, how would I extract the string between the quotes that follows data-selected (i.e. THIS-DATA). I would like it to work regardless of whether single or double quotes are used, or whether there is any white-space before or after the equal sign. Thank you
<td><img alt="abc" src="lib/templates/administrator/images/star.png" data-selected="THIS_DATA" title="None" class="vtip"></td>
Simple regex, assuming
THIS_DATAdoesn’t contain quotes:To use:
Edit:
Or even simpler: