regex-compat -Text.Regex  

<div class="doc"><p>Regular expression matching. Uses the POSIX regular expression interface in <a href="">Text.Regex.Posix</a>. </p></div>

regex-compat -Text.Regex  

<p>A compiled regular expression. </p>

regex-compat -Text.Regex  

<p>Match a regular expression against a string </p>
matchRegexAll :: Regex-> String-> Maybe (String, String, String, [String])

regex-compat -Text.Regex  

<p>Match a regular expression against a string, returning more information about the match. </p>

regex-compat -Text.Regex  

<p>Makes a regular expression with the default options (multi-line, case-sensitive). The syntax of regular expressions is otherwise that of <code>egrep</code> (i.e. POSIX "extended" regular expressions). </p>

regex-compat -Text.Regex  

<p>Makes a regular expression, where the multi-line and case-sensitive options can be changed from the default settings. </p>

regex-compat -Text.Regex  

<p>Splits a string based on a regular expression. The regular expression should identify one delimiter. </p><p>This does not advance and produces an infinite list of [] if the regex matches an empty string. This misfeature is here to match the behavior of the the original Text.Regex API. </p>
subRegex :: Regex-> String-> String-> String

regex-compat -Text.Regex  

<p>Replaces every occurance of the given regexp with the replacement string. </p><p>In the replacement string, <code>"\1"</code> refers to the first substring; <code>"\2"</code> to the second, etc; and <code>"\0"</code> to the entire match. <code>"\\\\"</code> will insert a literal backslash. </p><p>This does not advance if the regex matches an empty string. This misfeature is here to match the behavior of the the original Text.Regex API. </p>

regex-base -Text.Regex.Base  

<div class="doc"><p>Classes and instances for Regex matching. </p><p>This module merely imports and re-exports the common part of the new api: <a href="/?query=%28%28name%3A%28%21Text.Regex.Base.RegexLike%29%20package%3A%28%21regex-base%29%20module%3A%28%21Text.Regex.Base.RegexLike%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21Text.Regex.Base.RegexLike%29%20package%3A%28%21regex-base%29%29%5E10.0%29%20OR%20name%3A%28%21Text.Regex.Base.RegexLike%29">Text.Regex.Base.RegexLike</a> and <a href="/?query=%28%28name%3A%28%21Text.Regex.Base.Context%29%20package%3A%28%21regex-base%29%20module%3A%28%21Text.Regex.Base.Context%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21Text.Regex.Base.Context%29%20package%3A%28%21regex-base%29%29%5E10.0%29%20OR%20name%3A%28%21Text.Regex.Base.Context%29">Text.Regex.Base.Context</a>. </p><p>To see what result types the instances of RegexContext can produce, please read the <a href="/?query=%28%28name%3A%28%21Text.Regex.Base.Context%29%20package%3A%28%21regex-base%29%20module%3A%28%21Text.Regex.Base.Context%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21Text.Regex.Base.Context%29%20package%3A%28%21regex-base%29%29%5E10.0%29%20OR%20name%3A%28%21Text.Regex.Base.Context%29">Text.Regex.Base.Context</a> haddock documentation. </p><p>This does not provide any of the backends, just the common interface they all use. The modules which provide the backends and their cabal packages are: </p><ul><li> <code>Text.Regex.Posix</code> from regex-posix </li><li> <code>Text.Regex</code> from regex-compat (uses regex-posix) </li><li> <code>Text.Regex.Parsec</code> from regex-parsec </li><li> <code>Text.Regex.DFA</code> from regex-dfa </li><li> <code>Text.Regex.PCRE</code> from regex-pcre </li><li> <code>Test.Regex.TRE</code> from regex-tre </li></ul><p>In fact, just importing one of the backends is adequate, you do not also need to import this module. </p><p>TODO: Copy Example*hs files into this haddock comment </p></div>

regex-compat-tdfa -Text.Regex  

<div class="doc"><p>Regular expression matching. Uses the POSIX regular expression interface in <a href="/?query=%28%28name%3A%28%21Text.Regex.TDFA%29%20package%3A%28%21regex-tdfa%29%20module%3A%28%21Text.Regex.TDFA%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21Text.Regex.TDFA%29%20package%3A%28%21regex-tdfa%29%29%5E10.0%29%20OR%20name%3A%28%21Text.Regex.TDFA%29">Text.Regex.TDFA</a>. </p></div>

regex-compat-tdfa -Text.Regex  

<p>The TDFA backend specific <code><a href="/?query=%28%28name%3A%28%21Regex%29%20package%3A%28%21regex-compat-tdfa%29%20module%3A%28%21Text.Regex%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21Regex%29%20package%3A%28%21regex-compat-tdfa%29%29%5E10.0%29%20OR%20name%3A%28%21Regex%29">Regex</a></code> type, used by this module's RegexOptions and RegexMaker </p>

regex-compat-tdfa -Text.Regex  

<p>Match a regular expression against a string </p>
matchRegexAll :: Regex-> String-> Maybe (String, String, String, [String])

regex-compat-tdfa -Text.Regex  

<p>Match a regular expression against a string, returning more information about the match. </p>

regex-compat-tdfa -Text.Regex  

<p>Makes a regular expression with the default options (multi-line, case-sensitive). The syntax of regular expressions is otherwise that of <code>egrep</code> (i.e. POSIX "extended" regular expressions). </p>

regex-compat-tdfa -Text.Regex  

<p>Makes a regular expression, where the multi-line and case-sensitive options can be changed from the default settings. </p>

regex-compat-tdfa -Text.Regex  

<p>Splits a string based on a regular expression. The regular expression should identify one delimiter. </p><p>This does not advance and produces an infinite list of [] if the regex matches an empty string. This misfeature is here to match the behavior of the the original Text.Regex API. </p>
subRegex :: Regex-> String-> String-> String

regex-compat-tdfa -Text.Regex  

<p>Replaces every occurance of the given regexp with the replacement string. </p><p>In the replacement string, <code>"\1"</code> refers to the first substring; <code>"\2"</code> to the second, etc; and <code>"\0"</code> to the entire match. <code>"\\\\"</code> will insert a literal backslash. </p><p>This does not advance if the regex matches an empty string. This misfeature is here to match the behavior of the the original Text.Regex API. </p>

regex-posix -Text.Regex.Posix  

<div class="doc"><p>Module that provides the Regex backend that wraps the c posix regex api. This is the backend being used by the regex-compat package to replace Text.Regex </p><p>The <a href="/?query=%28%28name%3A%28%21Text.Regex.Posix%29%20package%3A%28%21regex-posix%29%20module%3A%28%21Text.Regex.Posix%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21Text.Regex.Posix%29%20package%3A%28%21regex-posix%29%29%5E10.0%29%20OR%20name%3A%28%21Text.Regex.Posix%29">Text.Regex.Posix</a> module provides a backend for regular expressions. If you import this along with other backends, then you should do so with qualified imports, perhaps renamed for convenience. </p><p>If the <code><a href="/?query=%28%28name%3A%28%21%3D~%29%20package%3A%28%21regex-posix%29%20module%3A%28%21Text.Regex.Posix.Wrap%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21%3D~%29%20package%3A%28%21regex-posix%29%29%5E10.0%29%20OR%20name%3A%28%21%3D~%29">=~</a></code> and <code><a href="/?query=%28%28name%3A%28%21%3D~~%29%20package%3A%28%21regex-posix%29%20module%3A%28%21Text.Regex.Posix.Wrap%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21%3D~~%29%20package%3A%28%21regex-posix%29%29%5E10.0%29%20OR%20name%3A%28%21%3D~~%29">=~~</a></code> functions are too high level, you can use the compile, regexec, and execute functions from importing either <a href="/?query=%28%28name%3A%28%21Text.Regex.Posix.String%29%20package%3A%28%21regex-posix%29%20module%3A%28%21Text.Regex.Posix.String%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21Text.Regex.Posix.String%29%20package%3A%28%21regex-posix%29%29%5E10.0%29%20OR%20name%3A%28%21Text.Regex.Posix.String%29">Text.Regex.Posix.String</a> or <a href="/?query=%28%28name%3A%28%21Text.Regex.Posix.ByteString%29%20package%3A%28%21regex-posix%29%20module%3A%28%21Text.Regex.Posix.ByteString%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21Text.Regex.Posix.ByteString%29%20package%3A%28%21regex-posix%29%29%5E10.0%29%20OR%20name%3A%28%21Text.Regex.Posix.ByteString%29">Text.Regex.Posix.ByteString</a>. If you want to use a low-level <code><a href="">CString</a></code> interface to the library, then import <a href="/?query=%28%28name%3A%28%21Text.Regex.Posix.Wrap%29%20package%3A%28%21regex-posix%29%20module%3A%28%21Text.Regex.Posix.Wrap%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21Text.Regex.Posix.Wrap%29%20package%3A%28%21regex-posix%29%29%5E10.0%29%20OR%20name%3A%28%21Text.Regex.Posix.Wrap%29">Text.Regex.Posix.Wrap</a> and use the wrap* functions. </p><p>This module is only efficient with <code><a href="">ByteString</a></code> only if it is null terminated, i.e. <code>(Bytestring.last bs)==0</code>. Otherwise the library must make a temporary copy of the <code><a href="">ByteString</a></code> and append the NUL byte. </p><p>A <code><a href="">String</a></code> will be converted into a <code><a href="">CString</a></code> for processing. Doing this repeatedly will be very inefficient. </p><p>Note that the posix library works with single byte characters, and does not understand Unicode. If you need Unicode support you will have to use a different backend. </p><p>When offsets are reported for subexpression captures, a subexpression that did not match anything (as opposed to matching an empty string) will have its offset set to the <code><a href="/?query=%28%28name%3A%28%21unusedRegOffset%29%20package%3A%28%21regex-posix%29%20module%3A%28%21Text.Regex.Posix.Wrap%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21unusedRegOffset%29%20package%3A%28%21regex-posix%29%29%5E10.0%29%20OR%20name%3A%28%21unusedRegOffset%29">unusedRegOffset</a></code> value, which is (-1). </p><p>Benchmarking shows the default regex library on many platforms is very inefficient. You might increase performace by an order of magnitude by obtaining libpcre and regex-pcre or libtre and regex-tre. If you do not need the captured substrings then you can also get great performance from regex-dfa. If you do need the capture substrings then you may be able to use regex-parsec to improve performance. </p></div>