Browsers consider an <option>
selected by default if it has the selected="selected"
attributes. But this somehow works even if that attribute value is omitted.
So
<option selected="selected" value="1">value text</option>
and this works
<option selected value="1">value text</option>
My question is how to write a Regex pattern that matches both conditions above, but never matches something like
<option value="the devil with **selected** ">value text</option>
EDIT: I forgot to mention that some conditions are still considered valid XHTML, like selected='selected', or selected=selected or even selected=SelEctEd