jithoosin has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
I have a problem. I wanted to get every html tag in a file,that is every thing between < and > using RegEx (without using HTML::TokenParser). So i used m/<([^>]+)>/.
But the problem occurs in cases like this <select name="url>adee" value="wq<ew">.Here the ">" inside "url>adee" is stopping the regEx .Is there any good solution using regEx.
After reading the first 2 replies i will explain my situation .I am in a BETwith my friends that it is possible with regEx to do it. Please help me.There is a solution for everything .Please help me. I wanna win the bet.
I have a problem. I wanted to get every html tag in a file,that is every thing between < and > using RegEx (without using HTML::TokenParser). So i used m/<([^>]+)>/.
But the problem occurs in cases like this <select name="url>adee" value="wq<ew">.Here the ">" inside "url>adee" is stopping the regEx .Is there any good solution using regEx.
After reading the first 2 replies i will explain my situation .I am in a BETwith my friends that it is possible with regEx to do it. Please help me.There is a solution for everything .Please help me. I wanna win the bet.
2005-11-11 Retitled by g0n, as per Monastery guidelines
Original title: 'simple regExpr'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Parsing HTML tags with regex
by tphyahoo (Vicar) on Nov 11, 2005 at 10:46 UTC | |
by jithoosin (Scribe) on Nov 11, 2005 at 11:55 UTC | |
Re: Parsing HTML tags with regex
by gopalr (Priest) on Nov 11, 2005 at 08:50 UTC | |
by Perl Mouse (Chaplain) on Nov 14, 2005 at 11:22 UTC | |
by Anonymous Monk on Jan 19, 2012 at 09:11 UTC | |
by jithoosin (Scribe) on Nov 11, 2005 at 09:23 UTC | |
by gopalr (Priest) on Nov 11, 2005 at 10:09 UTC | |
by jithoosin (Scribe) on Nov 11, 2005 at 12:21 UTC | |
Re: Parsing HTML tags with regex
by pg (Canon) on Nov 11, 2005 at 08:21 UTC | |
Re: Parsing HTML tags with regex
by Skeeve (Parson) on Nov 11, 2005 at 09:47 UTC | |
by Perl Mouse (Chaplain) on Nov 14, 2005 at 11:17 UTC | |
by jithoosin (Scribe) on Nov 11, 2005 at 11:59 UTC | |
by fizbin (Chaplain) on Nov 11, 2005 at 12:40 UTC | |
Re: Parsing HTML tags with regex
by murugu (Curate) on Nov 11, 2005 at 08:20 UTC | |
Re: Parsing HTML tags with regex
by BUU (Prior) on Nov 11, 2005 at 08:32 UTC |
Back to
Seekers of Perl Wisdom