Browse thread
Stdlib regularity
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 1999-10-12 (14:11) |
From: | David Mentr{'e} <David.Mentre@i...> |
Subject: | Re: Stdlib regularity |
skaller <skaller@maxtal.com.au> writes: > This is mainly because I have to do things like convert > a string or plain text to HTML, which requires replacing > characters '<' with '<'; that is, scan each individual > character .. in an interpretive loop. It could be choking for you, especially in a Caml mailing-list, but have you: 1. consider using regular expressions? They are typically made for the kind of thing you are trying to do. And regex engines have optimization. 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, d. -- David.Mentre@irisa.fr -- http://www.irisa.fr/prive/dmentre/ Opinions expressed here are only mine.