1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="manual.css">
<TITLE>
The str library: regular expressions and string processing
</TITLE>
</HEAD>
<BODY >
<A HREF="manual036.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="manual038.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>
<H1 CLASS="chapter"><A NAME="htoc255">Chapter 23</A> The str library: regular expressions and string processing</H1>
The <TT>str</TT> library provides high-level string processing functions,
some based on regular expressions. It is intended to support the kind
of file processing that is usually performed with scripting languages
such as <TT>awk</TT>, <TT>perl</TT> or <TT>sed</TT>.<BR>
<BR>
Programs that use the <TT>str</TT> library must be linked as follows:
<PRE>
ocamlc <I>other options</I> str.cma <I>other files</I>
ocamlopt <I>other options</I> str.cmxa <I>other files</I>
</PRE>
For interactive use of the <TT>str</TT> library, do:
<PRE>
ocamlmktop -o mytop str.cma
./mytop
</PRE>
or (if dynamic linking of C libraries is supported on your platform),
start <TT>ocaml</TT> and type <TT>#load "str.cma";;</TT>.<BR>
<BR>
<a HREF="libref/Str.html"> Module <tt>Str</tt>: regular expressions and string processing</a>
<BR>
<BR>
<BR>
<BR>
<HR>
<A HREF="manual036.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="manual038.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
|