match a regular expression to get attribute
I'm already so desperate with this one. I need to be able to match the following pieces of text but:
1) despite of any garbage before the text staveb
and
2) I need to match every <OPTION ....</OPTION>
with occurence of the text staveb
that means, I need to match these pieces of text:
<OPTION value="39"> Stavebníctvo</OPTION>
<OPTION value="39">staveb</OPTION>
<OPTION value="39">staveb</OPTION>
from this text:
<OPTION value="25"> Anglicky</O开发者_如何学JAVAPTION> <OPTION value="19">Auto, moto</OPTION> **<OPTION value="39"> Stavebníctvo</OPTION>** <OPTION value="26">Školstvo</OPTION>
**<OPTION value="39">staveb</OPTION>**
Pleease help!
try this:
<OPTION\s+value="\d+">[^>]*staveb[^<]*</OPTION>
精彩评论