Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to copy data from a selection box with the "multiple" HTML attribute that looks something like this:

EXTRACT FROM OP's image

I have tried selecting all options and do "Ctrl-C" but it didn't work. When I go to the source, I can get the data but there is no way to filter out the HTML codes that goes with it.

share|improve this question

1 Answer 1

up vote 2 down vote accepted
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>

Copy all the option tags (see above) from the HTML source (you'll find them between select tags) and paste into Notepad++, then search/replace as follows with the Regular expression option selected:

1

Find what: <option.*?>(.*?)</option>
Replace with: \1

You can also use Microsoft Word to search/replace as follows with the Use wildcards option selected:

2

Find what: \<option*\>(*)\</option\>
Replace with: \1

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.