develooper Front page | perl.beginners | Postings from April 2012

Re: Regex again..

Thread Previous | Thread Next
From:
Shlomi Fish
Date:
April 14, 2012 09:06
Subject:
Re: Regex again..
Message ID:
20120414190554.75595a4d@lap.shlomifish.org
Hi Somu,

On Sat, 14 Apr 2012 21:01:03 +0530
Somu <som.ctc@gmail.com> wrote:

> OK. Can i ask "WHY?"
> Why can't it be done using regex. Isn't a html file just another long
> string with more, but similar special characters??
> 

first of all I should note that you appear to be replying to the wrong messages
which breaks the flow of the thread. Otherwise, please read the links which I
gave you:

[QUOTE]

please don't use regular expressions to parse and process HTML:

* 
http://perl-begin.org/FAQs/freenode-perl/#I_need_to_parse_HTML_with_Perl_.28and_my_Regular_Expression_does_not_work.29

(short URL - http://xrl.us/bm3p8u ).

*
http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags

(Especially the first comment which is very amusing).

[/QUOTE]

And now I found this as well:

http://www.codinghorror.com/blog/2009/11/parsing-html-the-cthulhu-way.html
 
Regards,

	Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Free (Creative Commons) Music Downloads, Reviews and more - http://jamendo.com/

If at first you don't succeed, destroy all evidence that you tried.
    — Unknown

Please reply to list if it's a mailing list post - http://shlom.in/reply .

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About