1

I have a long list of countries like this:

<option value="Afghanistan" >Afghanistan</option>
<option value="Afrique du Sud" >Afrique du Sud</option>
<option value="Albanie" >Albanie</option>

And I'd like to cut out all the HTML code, so that I'm left with:

Afghanistan
Afrique du sud
Albanie

I'm using Geany, which allows me to use regular expression in my search and replace terms. What can expressions I use for that?

1 Answer 1

5

If all the lines are formatted just as in your example, you can search separately for <option [^>]*> and </option> and replace them with an empty string. Just be careful to select only your country list when doing the find-and-replace or the regex may go wild and replace unintended strings.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.