/usr/share/doc/libagrep-ocaml-dev/html/Agrep.html is in libagrep-ocaml-dev 1.0-11build5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Agrep" rel="Chapter" href="Agrep.html"><title>Agrep</title>
</head>
<body>
<div class="navbar"> <a href="index.html">Up</a>
</div>
<center><h1>Module <a href="type_Agrep.html">Agrep</a></h1></center>
<br>
<pre><span class="keyword">module</span> Agrep: <code class="code">sig</code> <a href="Agrep.html">..</a> <code class="code">end</code></pre>String searching with errors<br>
<hr width="100%">
<pre><span id="TYPEpattern"><span class="keyword">type</span> <code class="type"></code>pattern</span> </pre>
<div class="info">
The type of compiled search patterns<br>
</div>
<pre><span id="VALpattern"><span class="keyword">val</span> pattern</span> : <code class="type">?transl:string -> string -> <a href="Agrep.html#TYPEpattern">pattern</a></code></pre><div class="info">
Compile a search pattern. The syntax for patterns is
similar to that of the Unix shell. The following constructs
are recognized:<ul>
<li><code class="code">? </code> match any single character</li>
<li><code class="code">* </code> match any sequence of characters</li>
<li><code class="code">[..] </code> character set: ranges are denoted with <code class="code">-</code>, as in <code class="code">[a-z]</code>;
an initial <code class="code">^</code>, as in <code class="code">[^0-9]</code>, complements the set</li>
<li><code class="code">& </code> conjunction (e.g. <code class="code">sweet&sour</code>)</li>
<li><code class="code">| </code> alternative (e.g. <code class="code">high|low</code>)</li>
<li><code class="code">(..) </code> grouping</li>
<li><code class="code">\ </code> escape special characters; the special characters
are <code class="code">\?*[]&|()</code>.</li>
</ul>
The optional argument <code class="code">transl</code> is a character translation table.
This is a string <code class="code">s</code> of length 256 that ``translates'' a
character <code class="code">c</code> to the character <code class="code">s.(Char.code c)</code>. A character
of the text matches a character of the pattern if they both
translate to the same character according to <code class="code">transl</code>.
If <code class="code">transl</code> is not provided, the identity translation
(two characters match iff they are equal) is assumed.
Useful predefined translation tables are provided in
<a href="Agrep.Iso8859_15.html"><code class="code">Agrep.Iso8859_15</code></a>.<br>
</div>
<pre><span id="EXCEPTIONSyntax_error"><span class="keyword">exception</span> Syntax_error</span> <span class="keyword">of</span> <code class="type">int</code></pre>
<div class="info">
Exception thrown by <a href="Agrep.html#VALpattern"><code class="code">Agrep.pattern</code></a> when the given pattern
is syntactically incorrect. The integer argument is the
character number where the syntax error occurs.<br>
</div>
<pre><span id="VALpattern_string"><span class="keyword">val</span> pattern_string</span> : <code class="type">?transl:string -> string -> <a href="Agrep.html#TYPEpattern">pattern</a></code></pre><div class="info">
<code class="code">Agrep.pattern_string s</code> returns a pattern that matches exactly
the string <code class="code">s</code> and nothing else. The optional parameter
<code class="code">transl</code> is as in <a href="Agrep.html#VALpattern"><code class="code">Agrep.pattern</code></a>.<br>
</div>
<pre><span id="VALstring_match"><span class="keyword">val</span> string_match</span> : <code class="type"><a href="Agrep.html#TYPEpattern">pattern</a> -> ?numerrs:int -> ?wholeword:bool -> string -> bool</code></pre><div class="info">
<code class="code">string_match pat text</code> tests whether the string <code class="code">text</code>
matches the compiled pattern <code class="code">pat</code>. The optional parameter
<code class="code">numerrs</code> is the number of errors permitted. One error
corresponds to a substitution, an insertion or a deletion
of a character. <code class="code">numerrs</code> default to 0 (exact match).
The optional parameter <code class="code">wholeword</code> is <code class="code">true</code> if the pattern must
match a whole word, <code class="code">false</code> if it can match inside a word.
<code class="code">wholeword</code> defaults to <code class="code">false</code> (match inside words).<br>
</div>
<pre><span id="VALsubstring_match"><span class="keyword">val</span> substring_match</span> : <code class="type"><a href="Agrep.html#TYPEpattern">pattern</a> -><br> ?numerrs:int -> ?wholeword:bool -> string -> pos:int -> len:int -> bool</code></pre><div class="info">
Same as <a href="Agrep.html#VALstring_match"><code class="code">Agrep.string_match</code></a>, but restrict the match to the
substring of the given string starting at character number
<code class="code">pos</code> and extending <code class="code">len</code> characters.<br>
</div>
<pre><span id="VALerrors_substring_match"><span class="keyword">val</span> errors_substring_match</span> : <code class="type"><a href="Agrep.html#TYPEpattern">pattern</a> -><br> ?numerrs:int -> ?wholeword:bool -> string -> pos:int -> len:int -> int</code></pre><div class="info">
Same as <a href="Agrep.html#VALsubstring_match"><code class="code">Agrep.substring_match</code></a>, but return the smallest number
of errors such that the substring matches the pattern.
That is, it returns <code class="code">0</code> if the substring matches exactly,
<code class="code">1</code> if the substring matches with one error, etc.
Return <code class="code">max_int</code> if the substring does not match the pattern
with at most <code class="code">numerrs</code> errors.<br>
</div>
<pre><span class="keyword">module</span> <a href="Agrep.Iso8859_15.html">Iso8859_15</a>: <code class="code">sig</code> <a href="Agrep.Iso8859_15.html">..</a> <code class="code">end</code></pre><div class="info">
Useful translation tables for the ISO 8859-15 (Latin-1 with Euro)
character set.
</div>
</body></html>
|