Trying to extract the selected option from a select list such as:
<select name="chk_prequalify"><option value="">(select)</option><option value="N">No</option><option value="Y" selected>Yes</option></select>
The regular expression of:
works great, so long as that select list has "selected" in one of the options. If I don't have a "selected" in the text to search, it goes down to the next occurrence of where it finds selected (possibly WAY down) and grabs that.
So my question is, using the select list shown above:
How can I extract the "Yes" for selected? And,
How can I extract the "Y" for the value of that selected option?
These would of course be two different regular expressions. But I do need to be able to accommodate for instances where there is no "selected", and the regular expression will simply not match, instead of matching something way down further from another select list.
Thanks for your help!