Re: Stdlib regularity

From: David Mentr{'e} (
Date: Tue Oct 12 1999 - 09:20:36 MET DST

To: skaller <>
Subject: Re: Stdlib regularity
From: "David Mentr{'e}" <>
Date: 12 Oct 1999 09:20:36 +0200
In-Reply-To: skaller's message of "Mon, 11 Oct 1999 10:36:25 +1000"

skaller <> writes:

> This is mainly because I have to do things like convert
> a string or plain text to HTML, which requires replacing
> characters '<' with '&lt;'; that is, scan each individual
> character .. in an interpretive loop.

It could be choking for you, especially in a Caml mailing-list, but have

 1. consider using regular expressions? They are typically made for the
    kind of thing you are trying to do. And regex engines have

 2. consider using the Perl language? Is far from perfect, not very
    clean (in the Caml way at least (in other way either ;)) but has a
    very powerful bultin regex engine. Even without Perl, OCaml has a
    regex library I think.

Any way, I think you should have a look at _Mastering Regular
Expressions_ O'Reilly book.

Best regards,

-- --
 Opinions expressed here are only mine.

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:27 MET