I am using a script which does this:
$attrSubSet = explode('=', trim($attribute), 2);

Its basically taking something like:

Or any attribute you might find in HTML and splitting it into two for further processing.

The issue is if we have something like this:

Where there is more equal signs in the attribute value which should be ignored since they are not seperating the actual attribute.

Is there anyway to ignore equal signs inside quotes or single quotes with regex?