Regular Expression

  • Thread starter Thread starter Ori
  • Start date Start date
O

Ori

Hi,

I have the html content of my page and I want to extract all the
values which I have in one of my drop down list.

Does anyone know how to do it using regular expression ?


Thanks,

Ori.
 
if you just want those values that you already have in your list::
Regex r = new Regex("option|option2|option3");
MatchCollection m = r.Match(HTMLasString);

if you want each line that begins with any of those values::
Regex r = new Regex("^options|seperated|by|pipes.*?$");
MatchCollection m = r.Match(r);

good luck regex's can get pretty hairy ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

HTML And Regular Explression 3
Regular expressions 20
Regular expression 5
regular expressions 5
Regular expression 4
Regular Expression Help 1
Regular Expression? 3
Regular Expression Matches 9

Back
Top