/usr/share/doc/libghc-regex-posix-doc/html/Text-Regex-Posix-ByteString.html is in libghc-regex-posix-doc 0.95.2-3.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Text.Regex.Posix.ByteString</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Text-Regex-Posix-ByteString.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text-Regex-Posix-ByteString.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">regex-posix-0.95.2: Replaces/Enhances Text.Regex</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable (regex-base needs MPTC+FD)</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>libraries@haskell.org, textregexlazy@personal.mightyreason.com</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Text.Regex.Posix.ByteString</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Types
</a></li><li><a href="#g:2">Miscellaneous
</a></li><li><a href="#g:3">Medium level API functions
</a></li><li><a href="#g:4">Compilation options
</a></li><li><a href="#g:5">Execution options
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This provides <code><a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a></code> instances for RegexMaker and RegexLike
based on <a href="Text-Regex-Posix-Wrap.html">Text.Regex.Posix.Wrap</a>, and a (RegexContext Regex
ByteString ByteString) instance.
</p><p>To use these instance, you would normally import
<a href="Text-Regex-Posix.html">Text.Regex.Posix</a>. You only need to import this module to use
the medium level API of the compile, regexec, and execute
functions. All of these report error by returning Left values
instead of undefined or error or fail.
</p><p>The ByteString will only be passed to the library efficiently (as a
pointer) if it ends in a NUL byte. Otherwise a temporary copy must
be made with the 0 byte appended.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Regex">Regex</a> </li><li class="src short"><span class="keyword">type</span> <a href="#t:MatchOffset">MatchOffset</a> = <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:MatchLength">MatchLength</a> = <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ReturnCode">ReturnCode</a> </li><li class="src short"><span class="keyword">type</span> <a href="#t:WrapError">WrapError</a> = (<a href="Text-Regex-Posix-ByteString.html#t:ReturnCode">ReturnCode</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>)</li><li class="src short"><a href="#v:unusedOffset">unusedOffset</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:compile">compile</a> :: <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> -> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Text-Regex-Posix-ByteString.html#t:WrapError">WrapError</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a>)</li><li class="src short"><a href="#v:execute">execute</a> :: <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Text-Regex-Posix-ByteString.html#t:WrapError">WrapError</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/array-0.4.0.1/Data-Array.html#t:Array">Array</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> (<a href="Text-Regex-Posix-ByteString.html#t:MatchOffset">MatchOffset</a>, <a href="Text-Regex-Posix-ByteString.html#t:MatchLength">MatchLength</a>))))</li><li class="src short"><a href="#v:regexec">regexec</a> :: <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Text-Regex-Posix-ByteString.html#t:WrapError">WrapError</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a>, [<a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a>])))</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:CompOption">CompOption</a> = <a href="#v:CompOption">CompOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Foreign-C-Types.html#t:CInt">CInt</a></li><li class="src short"><a href="#v:compBlank">compBlank</a> :: <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compExtended">compExtended</a> :: <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compIgnoreCase">compIgnoreCase</a> :: <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compNoSub">compNoSub</a> :: <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compNewline">compNewline</a> :: <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ExecOption">ExecOption</a> = <a href="#v:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Foreign-C-Types.html#t:CInt">CInt</a></li><li class="src short"><a href="#v:execBlank">execBlank</a> :: <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a></li><li class="src short"><a href="#v:execNotBOL">execNotBOL</a> :: <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a></li><li class="src short"><a href="#v:execNotEOL">execNotEOL</a> :: <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a></li></ul></div><div id="interface"><h2 id="g:1">Types
</h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Regex" class="def">Regex</a> <a href="src/Text-Regex-Posix-Wrap.html#Regex" class="link">Source</a></p><div class="doc"><p>A compiled regular expression.
</p></div><div class="subs instances"><p id="control.i:Regex" class="caption collapser" onclick="toggleSection('i:Regex')">Instances</p><div id="section.i:Regex" class="show"><table><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexLike">RegexLike</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexLike">RegexLike</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexLike">RegexLike</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexOptions">RegexOptions</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexContext">RegexContext</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexContext">RegexContext</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexContext">RegexContext</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-Sequence.html#t:Seq">Seq</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a>)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexLike">RegexLike</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-Sequence.html#t:Seq">Seq</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a>)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexContext">RegexContext</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-Sequence.html#t:Seq">Seq</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a>) (<a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-Sequence.html#t:Seq">Seq</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a>)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:MatchOffset" class="def">MatchOffset</a> = <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></p><div class="doc"><p>0 based index from start of source, or (-1) for unused
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:MatchLength" class="def">MatchLength</a> = <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></p><div class="doc"><p>non-negative length of a match
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ReturnCode" class="def">ReturnCode</a> <a href="src/Text-Regex-Posix-Wrap.html#ReturnCode" class="link">Source</a></p><div class="doc"><p>ReturnCode is an enumerated <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Foreign-C-Types.html#t:CInt">CInt</a></code>, corresponding to the error codes
from <code>man 3 regex</code>:
</p><ul><li> <code><a href="Text-Regex-Posix-Wrap.html#v:retBadbr">retBadbr</a></code> (<code>REG_BADBR</code>) invalid repetition count(s) in <code>{ }</code>
</li><li> <code><a href="Text-Regex-Posix-Wrap.html#v:retBadpat">retBadpat</a></code> (<code>REG_BADPAT</code>) invalid regular expression
</li><li> <code><a href="Text-Regex-Posix-Wrap.html#v:retBadrpt">retBadrpt</a></code> (<code>REG_BADRPT</code>) <code>?</code>, <code>*</code>, or <code>+</code> operand invalid
</li><li> <code><a href="Text-Regex-Posix-Wrap.html#v:retEcollate">retEcollate</a></code> (<code>REG_ECOLLATE</code>) invalid collating element
</li><li> <code><a href="Text-Regex-Posix-Wrap.html#v:retEctype">retEctype</a></code> (<code>REG_ECTYPE</code>) invalid character class
</li><li> <code><a href="Text-Regex-Posix-Wrap.html#v:retEescape">retEescape</a></code> (<code>REG_EESCAPE</code>) <code>\</code> applied to unescapable character
</li><li> <code><a href="Text-Regex-Posix-Wrap.html#v:retEsubreg">retEsubreg</a></code> (<code>REG_ESUBREG</code>) invalid backreference number
</li><li> <code><a href="Text-Regex-Posix-Wrap.html#v:retEbrack">retEbrack</a></code> (<code>REG_EBRACK</code>) brackets <code>[ ]</code> not balanced
</li><li> <code><a href="Text-Regex-Posix-Wrap.html#v:retEparen">retEparen</a></code> (<code>REG_EPAREN</code>) parentheses <code>( )</code> not balanced
</li><li> <code><a href="Text-Regex-Posix-Wrap.html#v:retEbrace">retEbrace</a></code> (<code>REG_EBRACE</code>) braces <code>{ }</code> not balanced
</li><li> <code><a href="Text-Regex-Posix-Wrap.html#v:retErange">retErange</a></code> (<code>REG_ERANGE</code>) invalid character range in <code>[ ]</code>
</li><li> <code><a href="Text-Regex-Posix-Wrap.html#v:retEspace">retEspace</a></code> (<code>REG_ESPACE</code>) ran out of memory
</li><li> <code>retNoMatch</code> (<code>REG_NOMATCH</code>) The regexec() function failed to match
</li></ul></div><div class="subs instances"><p id="control.i:ReturnCode" class="caption collapser" onclick="toggleSection('i:ReturnCode')">Instances</p><div id="section.i:ReturnCode" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Text-Regex-Posix-ByteString.html#t:ReturnCode">ReturnCode</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Text-Regex-Posix-ByteString.html#t:ReturnCode">ReturnCode</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:WrapError" class="def">WrapError</a> = (<a href="Text-Regex-Posix-ByteString.html#t:ReturnCode">ReturnCode</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>)<a href="src/Text-Regex-Posix-Wrap.html#WrapError" class="link">Source</a></p><div class="doc"><p>The return code will be retOk when it is the Haskell wrapper and
not the underlying library generating the error message.
</p></div></div><h2 id="g:2">Miscellaneous
</h2><div class="top"><p class="src"><a name="v:unusedOffset" class="def">unusedOffset</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a><a href="src/Text-Regex-Posix-ByteString.html#unusedOffset" class="link">Source</a></p></div><h2 id="g:3">Medium level API functions
</h2><div class="top"><p class="src"><a name="v:compile" class="def">compile</a><a href="src/Text-Regex-Posix-ByteString.html#compile" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a></td><td class="doc"><p>Flags (summed together)
</p></td></tr><tr><td class="src">-> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a></td><td class="doc"><p>Flags (summed together)
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>The regular expression to compile
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Text-Regex-Posix-ByteString.html#t:WrapError">WrapError</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a>)</td><td class="doc"><p>Returns: the compiled regular expression
</p></td></tr></table></div><div class="doc"><p>Compiles a regular expression
</p></div></div><div class="top"><p class="src"><a name="v:execute" class="def">execute</a><a href="src/Text-Regex-Posix-ByteString.html#execute" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a></td><td class="doc"><p>Compiled regular expression
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>String to match against
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Text-Regex-Posix-ByteString.html#t:WrapError">WrapError</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/array-0.4.0.1/Data-Array.html#t:Array">Array</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> (<a href="Text-Regex-Posix-ByteString.html#t:MatchOffset">MatchOffset</a>, <a href="Text-Regex-Posix-ByteString.html#t:MatchLength">MatchLength</a>))))</td><td class="doc"><p>Returns: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Nothing">Nothing</a></code> if the regex did not match the
string, or:
<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Just">Just</a></code> an array of (offset,length) pairs where index 0 is whole match, and the rest are the captured subexpressions.
</p></td></tr></table></div><div class="doc"><p>Matches a regular expression against a buffer, returning the buffer
indicies of the match, and any submatches
</p><p>| Matches a regular expression against a string
</p></div></div><div class="top"><p class="src"><a name="v:regexec" class="def">regexec</a><a href="src/Text-Regex-Posix-ByteString.html#regexec" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a></td><td class="doc"><p>Compiled regular expression
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>String to match against
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Text-Regex-Posix-ByteString.html#t:WrapError">WrapError</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a>, [<a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a>])))</td><td class="doc empty"> </td></tr></table></div></div><h2 id="g:4">Compilation options
</h2><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:CompOption" class="def">CompOption</a> <a href="src/Text-Regex-Posix-Wrap.html#CompOption" class="link">Source</a></p><div class="doc"><p>A bitmapped <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Foreign-C-Types.html#t:CInt">CInt</a></code> containing options for compilation of regular
expressions. Option values (and their man 3 regcomp names) are
</p><ul><li> <code><a href="Text-Regex-Posix-ByteString.html#v:compBlank">compBlank</a></code> which is a completely zero value for all the flags.
This is also the <code><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#v:blankCompOpt">blankCompOpt</a></code> value.
</li><li> <code><a href="Text-Regex-Posix-ByteString.html#v:compExtended">compExtended</a></code> (REG_EXTENDED) which can be set to use extended instead
of basic regular expressions.
This is set in the <code><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#v:defaultCompOpt">defaultCompOpt</a></code> value.
</li><li> <code><a href="Text-Regex-Posix-ByteString.html#v:compNewline">compNewline</a></code> (REG_NEWLINE) turns on newline sensitivity: The dot (.)
and inverted set <code>[^ ]</code> never match newline, and ^ and $ anchors do
match after and before newlines.
This is set in the <code><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#v:defaultCompOpt">defaultCompOpt</a></code> value.
</li><li> <code><a href="Text-Regex-Posix-ByteString.html#v:compIgnoreCase">compIgnoreCase</a></code> (REG_ICASE) which can be set to match ignoring upper
and lower distinctions.
</li><li> <code><a href="Text-Regex-Posix-ByteString.html#v:compNoSub">compNoSub</a></code> (REG_NOSUB) which turns off all information from matching
except whether a match exists.
</li></ul></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:CompOption" class="def">CompOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Foreign-C-Types.html#t:CInt">CInt</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:CompOption" class="caption collapser" onclick="toggleSection('i:CompOption')">Instances</p><div id="section.i:CompOption" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Num">Num</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bits.html#t:Bits">Bits</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexOptions">RegexOptions</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-Sequence.html#t:Seq">Seq</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a>)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:compBlank" class="def">compBlank</a> :: <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a><a href="src/Text-Regex-Posix-Wrap.html#compBlank" class="link">Source</a></p><div class="doc"><p>A completely zero value for all the flags.
This is also the <code><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#v:blankCompOpt">blankCompOpt</a></code> value.
</p></div></div><div class="top"><p class="src"><a name="v:compExtended" class="def">compExtended</a> :: <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a><a href="src/Text-Regex-Posix-Wrap.html#compExtended" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compIgnoreCase" class="def">compIgnoreCase</a> :: <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a><a href="src/Text-Regex-Posix-Wrap.html#compIgnoreCase" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compNoSub" class="def">compNoSub</a> :: <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a><a href="src/Text-Regex-Posix-Wrap.html#compNoSub" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compNewline" class="def">compNewline</a> :: <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a><a href="src/Text-Regex-Posix-Wrap.html#compNewline" class="link">Source</a></p></div><h2 id="g:5">Execution options
</h2><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ExecOption" class="def">ExecOption</a> <a href="src/Text-Regex-Posix-Wrap.html#ExecOption" class="link">Source</a></p><div class="doc"><p>A bitmapped <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Foreign-C-Types.html#t:CInt">CInt</a></code> containing options for execution of compiled
regular expressions. Option values (and their man 3 regexec names) are
</p><ul><li> <code><a href="Text-Regex-Posix-ByteString.html#v:execBlank">execBlank</a></code> which is a complete zero value for all the flags. This is
the blankExecOpt value.
</li><li> <code><a href="Text-Regex-Posix-ByteString.html#v:execNotBOL">execNotBOL</a></code> (REG_NOTBOL) can be set to prevent ^ from matching at the
start of the input.
</li><li> <code><a href="Text-Regex-Posix-ByteString.html#v:execNotEOL">execNotEOL</a></code> (REG_NOTEOL) can be set to prevent $ from matching at the
end of the input (before the terminating NUL).
</li></ul></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ExecOption" class="def">ExecOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Foreign-C-Types.html#t:CInt">CInt</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:ExecOption" class="caption collapser" onclick="toggleSection('i:ExecOption')">Instances</p><div id="section.i:ExecOption" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Num">Num</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bits.html#t:Bits">Bits</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexOptions">RegexOptions</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-Posix-ByteString.html#t:Regex">Regex</a> <a href="Text-Regex-Posix-ByteString.html#t:CompOption">CompOption</a> <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/containers-0.5.0.0/Data-Sequence.html#t:Seq">Seq</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a>)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:execBlank" class="def">execBlank</a> :: <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a><a href="src/Text-Regex-Posix-Wrap.html#execBlank" class="link">Source</a></p><div class="doc"><p>A completely zero value for all the flags.
This is also the <code><a href="/usr/share/doc/libghc-regex-base-doc/html/Text-Regex-Base-RegexLike.html#v:blankExecOpt">blankExecOpt</a></code> value.
</p></div></div><div class="top"><p class="src"><a name="v:execNotBOL" class="def">execNotBOL</a> :: <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a><a href="src/Text-Regex-Posix-Wrap.html#execNotBOL" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:execNotEOL" class="def">execNotEOL</a> :: <a href="Text-Regex-Posix-ByteString.html#t:ExecOption">ExecOption</a><a href="src/Text-Regex-Posix-Wrap.html#execNotEOL" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>
|