html meta tags!

  • Thread starter Thread starter Abid
  • Start date Start date
A

Abid

Hi,

I need to parse out the META Tags in any HTML document or can say any
webpage...specifically I am interested in META keyword and META
description tags...can anyone please let me know the Regular
Expression for that...I will really appreciate it.

Thanks in advance.
 
Hi,

I need to parse out the META Tags in any HTML document or can say any
webpage...specifically I am interested in META keyword and META
description tags...can anyone please let me know the Regular
Expression for that...I will really appreciate it.

Thanks in advance.

something like

(?<=<meta\s+name=\"?description\"?\s+content=\"?).*?(?=>)

and

(?<=<meta\s+content=\"?).*?(?=\sname=\"?description\"?\s?\>)
 
something like

(?<=<meta\s+name=\"?description\"?\s+content=\"?).*?(?=>)

and

(?<=<meta\s+content=\"?).*?(?=\sname=\"?description\"?\s?\>)

Thanks alot, It helped me very much.
 
Back
Top