<!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.PCRE.String</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-PCRE-String.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text-Regex-PCRE-String.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-pcre-0.94.2: Replaces/Enhances Text.Regex</p></div><div id="content"><div id="module-header"><p class="caption">Text.Regex.PCRE.String</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">Constants for CompOption </a></li><li><a href="#g:5">Constants for ExecOption </a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This exports instances of the high level API and the medium level API of <code><a href="Text-Regex-PCRE-String.html#v:compile">compile</a></code>,<code><a href="Text-Regex-PCRE-String.html#v:execute">execute</a></code>, and <code><a href="Text-Regex-PCRE-String.html#v:regexec">regexec</a></code>. </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/html/libraries/base-4.3.1.0/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/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</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/html/libraries/base-4.3.1.0/Foreign-C-Types.html#t:CInt">CInt</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/html/libraries/base-4.3.1.0/Foreign-C-Types.html#t:CInt">CInt</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-PCRE-String.html#t:ReturnCode">ReturnCode</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>)</li><li class="src short"><a href="#v:unusedOffset">unusedOffset</a> :: <a href="Text-Regex-PCRE-String.html#t:MatchOffset">MatchOffset</a></li><li class="src short"><a href="#v:getVersion">getVersion</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></li><li class="src short"><a href="#v:compile">compile</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> -> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Either.html#t:Either">Either</a> (<a href="Text-Regex-PCRE-String.html#t:MatchOffset">MatchOffset</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>) <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a>)</li><li class="src short"><a href="#v:execute">execute</a> :: <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Either.html#t:Either">Either</a> <a href="Text-Regex-PCRE-String.html#t:WrapError">WrapError</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc/html/libraries/array-0.3.0.2/Data-Array.html#t:Array">Array</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> (<a href="Text-Regex-PCRE-String.html#t:MatchOffset">MatchOffset</a>, <a href="Text-Regex-PCRE-String.html#t:MatchLength">MatchLength</a>))))</li><li class="src short"><a href="#v:regexec">regexec</a> :: <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Either.html#t:Either">Either</a> <a href="Text-Regex-PCRE-String.html#t:WrapError">WrapError</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>, [<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>])))</li><li class="src short"><a href="#v:compBlank">compBlank</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compAnchored">compAnchored</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compAutoCallout">compAutoCallout</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compCaseless">compCaseless</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compDollarEndOnly">compDollarEndOnly</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compDotAll">compDotAll</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compExtended">compExtended</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compExtra">compExtra</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compFirstLine">compFirstLine</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compMultiline">compMultiline</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compNoAutoCapture">compNoAutoCapture</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compUngreedy">compUngreedy</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compUTF8">compUTF8</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:compNoUTF8Check">compNoUTF8Check</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></li><li class="src short"><a href="#v:execBlank">execBlank</a> :: <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></li><li class="src short"><a href="#v:execAnchored">execAnchored</a> :: <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></li><li class="src short"><a href="#v:execNotBOL">execNotBOL</a> :: <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></li><li class="src short"><a href="#v:execNotEOL">execNotEOL</a> :: <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></li><li class="src short"><a href="#v:execNotEmpty">execNotEmpty</a> :: <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></li><li class="src short"><a href="#v:execNoUTF8Check">execNoUTF8Check</a> :: <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></li><li class="src short"><a href="#v:execPartial">execPartial</a> :: <a href="Text-Regex-PCRE-String.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-PCRE-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/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexLike">RegexLike</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexLike">RegexLike</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexLike">RegexLike</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexOptions">RegexOptions</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexContext">RegexContext</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexContext">RegexContext</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexContext">RegexContext</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString.html#t:ByteString">ByteString</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> (<a href="/usr/share/doc/ghc/html/libraries/containers-0.4.0.0/Data-Sequence.html#t:Seq">Seq</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:Char">Char</a>)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexLike">RegexLike</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> (<a href="/usr/share/doc/ghc/html/libraries/containers-0.4.0.0/Data-Sequence.html#t:Seq">Seq</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:Char">Char</a>)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexContext">RegexContext</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> (<a href="/usr/share/doc/ghc/html/libraries/containers-0.4.0.0/Data-Sequence.html#t:Seq">Seq</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:Char">Char</a>) (<a href="/usr/share/doc/ghc/html/libraries/containers-0.4.0.0/Data-Sequence.html#t:Seq">Seq</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/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/html/libraries/base-4.3.1.0/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/html/libraries/base-4.3.1.0/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">newtype</span> <a name="t:CompOption" class="def">CompOption</a> <a href="src/Text-Regex-PCRE-Wrap.html#CompOption" class="link">Source</a></p><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/html/libraries/base-4.3.1.0/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/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Num">Num</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bits.html#t:Bits">Bits</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexOptions">RegexOptions</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> (<a href="/usr/share/doc/ghc/html/libraries/containers-0.4.0.0/Data-Sequence.html#t:Seq">Seq</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/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">newtype</span> <a name="t:ExecOption" class="def">ExecOption</a> <a href="src/Text-Regex-PCRE-Wrap.html#ExecOption" class="link">Source</a></p><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/html/libraries/base-4.3.1.0/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/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Num">Num</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bits.html#t:Bits">Bits</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexOptions">RegexOptions</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/regex-base-0.93.2/Text-Regex-Base-RegexLike.html#t:RegexMaker">RegexMaker</a> <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a> <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a> <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a> (<a href="/usr/share/doc/ghc/html/libraries/containers-0.4.0.0/Data-Sequence.html#t:Seq">Seq</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/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">data</span> <a name="t:ReturnCode" class="def">ReturnCode</a> <a href="src/Text-Regex-PCRE-Wrap.html#ReturnCode" class="link">Source</a></p><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/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Text-Regex-PCRE-String.html#t:ReturnCode">ReturnCode</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="Text-Regex-PCRE-String.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-PCRE-String.html#t:ReturnCode">ReturnCode</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>)<a href="src/Text-Regex-PCRE-Wrap.html#WrapError" class="link">Source</a></p></div><h2 id="g:2">Miscellaneous </h2><div class="top"><p class="src"><a name="v:unusedOffset" class="def">unusedOffset</a> :: <a href="Text-Regex-PCRE-String.html#t:MatchOffset">MatchOffset</a><a href="src/Text-Regex-PCRE-Wrap.html#unusedOffset" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:getVersion" class="def">getVersion</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a><a href="src/Text-Regex-PCRE-Wrap.html#getVersion" class="link">Source</a></p><div class="doc"><p>return version of pcre used or Nothing if pcre is not available. </p></div></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-PCRE-String.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-PCRE-String.html#t:CompOption">CompOption</a></td><td class="doc"><p>Flags (summed together) </p></td></tr><tr><td class="src">-> <a href="Text-Regex-PCRE-String.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/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc"><p>The regular expression to compile </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Either.html#t:Either">Either</a> (<a href="Text-Regex-PCRE-String.html#t:MatchOffset">MatchOffset</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>) <a href="Text-Regex-PCRE-String.html#t:Regex">Regex</a>)</td><td class="doc"><p>Returns: an error string and offset or 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-PCRE-String.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-PCRE-String.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/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc"><p>String to match against </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Either.html#t:Either">Either</a> <a href="Text-Regex-PCRE-String.html#t:WrapError">WrapError</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc/html/libraries/array-0.3.0.2/Data-Array.html#t:Array">Array</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> (<a href="Text-Regex-PCRE-String.html#t:MatchOffset">MatchOffset</a>, <a href="Text-Regex-PCRE-String.html#t:MatchLength">MatchLength</a>))))</td><td class="doc"><p>Returns: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> if the regex did not match the string, or: <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/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 string </p></div></div><div class="top"><p class="src"><a name="v:regexec" class="def">regexec</a><a href="src/Text-Regex-PCRE-String.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-PCRE-String.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/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc"><p>string to match </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Either.html#t:Either">Either</a> <a href="Text-Regex-PCRE-String.html#t:WrapError">WrapError</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>, [<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>])))</td><td class="doc"><p>Returns: Nothing if no match, else (text before match, text after match, array of matches with 0 being the whole match) </p></td></tr></table></div><div class="doc"><p>execute match and extract substrings rather than just offsets </p></div></div><h2 id="g:4">Constants for CompOption </h2><div class="top"><p class="src"><a name="v:compBlank" class="def">compBlank</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compBlank" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compAnchored" class="def">compAnchored</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compAnchored" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compAutoCallout" class="def">compAutoCallout</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compAutoCallout" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compCaseless" class="def">compCaseless</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compCaseless" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compDollarEndOnly" class="def">compDollarEndOnly</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compDollarEndOnly" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compDotAll" class="def">compDotAll</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compDotAll" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compExtended" class="def">compExtended</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compExtended" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compExtra" class="def">compExtra</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compExtra" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compFirstLine" class="def">compFirstLine</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compFirstLine" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compMultiline" class="def">compMultiline</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compMultiline" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compNoAutoCapture" class="def">compNoAutoCapture</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compNoAutoCapture" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compUngreedy" class="def">compUngreedy</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compUngreedy" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compUTF8" class="def">compUTF8</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compUTF8" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:compNoUTF8Check" class="def">compNoUTF8Check</a> :: <a href="Text-Regex-PCRE-String.html#t:CompOption">CompOption</a><a href="src/Text-Regex-PCRE-Wrap.html#compNoUTF8Check" class="link">Source</a></p></div><h2 id="g:5">Constants for ExecOption </h2><div class="top"><p class="src"><a name="v:execBlank" class="def">execBlank</a> :: <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a><a href="src/Text-Regex-PCRE-Wrap.html#execBlank" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:execAnchored" class="def">execAnchored</a> :: <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a><a href="src/Text-Regex-PCRE-Wrap.html#execAnchored" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:execNotBOL" class="def">execNotBOL</a> :: <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a><a href="src/Text-Regex-PCRE-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-PCRE-String.html#t:ExecOption">ExecOption</a><a href="src/Text-Regex-PCRE-Wrap.html#execNotEOL" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:execNotEmpty" class="def">execNotEmpty</a> :: <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a><a href="src/Text-Regex-PCRE-Wrap.html#execNotEmpty" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:execNoUTF8Check" class="def">execNoUTF8Check</a> :: <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a><a href="src/Text-Regex-PCRE-Wrap.html#execNoUTF8Check" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:execPartial" class="def">execPartial</a> :: <a href="Text-Regex-PCRE-String.html#t:ExecOption">ExecOption</a><a href="src/Text-Regex-PCRE-Wrap.html#execPartial" 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.9.2</p></div></body></html>