Can some recommend a regex to return the value when an item is selected as well as unselected as seen below.
<option value="32_1002_ACCT1001" selected="selected">ACCT1001 -- Accounting 1a</option>
<option value="32_1002_ACCT1002">ACCT1002 -- Accounting 1b</option>
My regex currently works only for the unselected option seen below.
(<option value="([^"]+)">([^<]+)<\/option>)
EDIT:
Thanks for the great responses guys, however I should have been a bit more detailed and specific.
I am using it in a screen-scraper extractor pattern as follows:
<option value="~@COURSE_ID@~">~@COURSE_CODE@~ -- ~@COURSE_NAME@~</option>
where ~@COURSE_ID@~ specifies the following regex query:
([^"]+)
Works fine for all option tags EXCEPT the first one which is already selected.
I am testing out your suggestions at the moment, but if anyone wants to jump in with a sure fire solution that would be great.
I'm really struggling with this one, nothing seems to be working!