<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <meta name="generator" content="hevea 2.00"> <link rel="stylesheet" type="text/css" href="manual.css"> <title>The str library: regular expressions and string processing</title> </head> <body> <a href="libnum.html"><img src="previous_motif.gif" alt="Previous"></a> <a href="index.html"><img src="contents_motif.gif" alt="Up"></a> <a href="libthreads.html"><img src="next_motif.gif" alt="Next"></a> <hr> <h1 class="chapter" id="sec472">Chapter 24  The str library: regular expressions and string processing</h1> <p>The <span class="c007">str</span> 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 <span class="c007">awk</span>, <span class="c007">perl</span> or <span class="c007">sed</span>.</p><p>Programs that use the <span class="c007">str</span> library must be linked as follows: </p><pre> ocamlc <span class="c013">other options</span> str.cma <span class="c013">other files</span> ocamlopt <span class="c013">other options</span> str.cmxa <span class="c013">other files</span> </pre><p> For interactive use of the <span class="c007">str</span> library, do: </p><pre> ocamlmktop -o mytop str.cma ./mytop </pre><p> or (if dynamic linking of C libraries is supported on your platform), start <span class="c007">ocaml</span> and type <span class="c007">#load "str.cma";;</span>.</p><ul class="ftoc2"><li class="li-links"> <a href="libref/Str.html">Module <span class="c007">Str</span>: regular expressions and string processing</a> </li></ul> <hr> <a href="libnum.html"><img src="previous_motif.gif" alt="Previous"></a> <a href="index.html"><img src="contents_motif.gif" alt="Up"></a> <a href="libthreads.html"><img src="next_motif.gif" alt="Next"></a> </body> </html>