Re: Reasons for preferring Lisp, and for what
From: Tuang (tuanglen_at_hotmail.com)
Date: 11/08/03
- Next message: Marcin 'Qrczak' Kowalczyk: "Re: Reasons for preferring Lisp, and for what"
- Previous message: Marco Baringer: "Re: web application framework"
- In reply to: Edi Weitz: "Re: Reasons for preferring Lisp, and for what"
- Next in thread: Russell Wallace: "Re: Reasons for preferring Lisp, and for what"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 8 Nov 2003 01:03:24 -0800
Edi Weitz <edi@agharta.de> wrote in message news:<87r80jrj6k.fsf@bird.agharta.de>...
> On 7 Nov 2003 12:35:11 -0800, tuanglen@hotmail.com (Tuang) wrote:
>
> > Actually, the built-in regex-based features let you make just about
> > any collection of data appear to be such a data structure, which you
> > can then apply the other Perl tools to. An example of this would be
> > fetching an HTML file from a URL, locating just the table of
> > interest amidst the other clutter, and parsing the lines out of the
> > table.
>
> The problem with Perl's (admittedly very good) regexp capabilities is
> that Perl users tend to think that they can attack almost every
> problem with regular expressions. (Been there, done that.)
>
> Trying to parse HTML or XML with regular expressions is really a bad
> idea....
It depends on how you mean this. If you mean what I think you mean,
that your generic HTML or XML manipulator library should be one that
is built expressly for that purpose, based on the formal specs, I
definitely agree. Perl has such libraries.
If you're just quickly extracting some specific data from some
specific Web page for yourself, though, then regular expressions are
excellent. It doesn't matter whether it's HTML or XML or whatever.
Just find some "landmarks" in the text you can use as delimeters to
base a regex on and let it extract your data.
Clearly this isn't a scalable approach. It's for one-time tasks, not
real applications and, as you point out, Perl users are famous for
taking it too far.
- Next message: Marcin 'Qrczak' Kowalczyk: "Re: Reasons for preferring Lisp, and for what"
- Previous message: Marco Baringer: "Re: web application framework"
- In reply to: Edi Weitz: "Re: Reasons for preferring Lisp, and for what"
- Next in thread: Russell Wallace: "Re: Reasons for preferring Lisp, and for what"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|