Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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
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:


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

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


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

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .