문제

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 Regexp expressions in my search and replace terms. What expressions can I use for that ?

도움이 되었습니까?

해결책

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.

다른 팁

See Regular Expressions in Geany Manual

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top