-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Replaces/enhances "Text.Regex"
--   
--   One module compat layer over <a>regex-posix</a> to replace
--   <a>Text.Regex</a>.
--   
--   See also <a>https://wiki.haskell.org/Regular_expressions</a> for more
--   information.
@package regex-compat
@version 0.95.2.2


-- | Regular expression matching. Uses the POSIX regular expression
--   interface in <a>Text.Regex.Posix</a>.
module Text.Regex

-- | A compiled regular expression.
data Regex

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

-- | Makes a regular expression, where the multi-line and case-sensitive
--   options can be changed from the default settings.
mkRegexWithOpts :: String -> Bool -> Bool -> Regex

-- | Match a regular expression against a string.
matchRegex :: Regex -> String -> Maybe [String]

-- | Match a regular expression against a string, returning more
--   information about the match.
matchRegexAll :: Regex -> String -> Maybe (String, String, String, [String])

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

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