{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-| The "Text.Regex.TRE" module provides a backend for regular expressions. To use it should be imported along with "Text.Regex.Lazy". If you import this along with other backends, then you should do so with qualified imports, perhaps renamed for convenience. You will need to have libpcre, from , to use this module. The haskell must be compiled with -DHAVE_TRE_H and linked with pcre. This is the default in the cabal file. If you do not compile with HAVE_TRE_H then the functions will still exist, but using them will create a run time error. You can test for the existance of TRE by checking 'getVersion' which is 'Nothing' if not compiled with TRE or 'Just' 'String' if TRE is present. Using the provided 'CompOption' and 'ExecOption' values and if 'configUTF8' is True, then you might be able to send UTF8 encoded ByteStrings to TRE and get sensible results. This is currently untested. The regular expression can be provided as a 'ByteString', but it will be copied and a NUL byte appended unless such a byte is already present. Thus the regular expression cannot contain an explicit NUL byte. The search string is passed as a CStringLen and may contain NUL bytes and does not need to end in a NUL byte, and is searched in place. A 'String' will be converted into a CString or CStringLen for processing. Doing this repeatedly will be very inefficient. -} {- Copyright : (c) Chris Kuklewicz 2007 -} module Text.Regex.TRE(getVersion_Text_Regex_TRE ,module Text.Regex.Base -- ** "Text.Regex.TRE.Wrap", a hsc module ,module Text.Regex.TRE.Wrap -- ** "Text.Regex.TRE.String", instances only ,module Text.Regex.TRE.String -- ** "Text.Regex.TRE.Sequence", instances only ,module Text.Regex.TRE.Sequence -- ** "Text.Regex.TRE.ByteString", instances only ,module Text.Regex.TRE.ByteString -- ** "Text.Regex.TRE.ByteString.Lazy", instances only ,module Text.Regex.TRE.ByteString.Lazy ) where import Text.Regex.TRE.Wrap(Regex, CompOption(CompOption), ExecOption(ExecOption), (=~), (=~~), ReturnCode, WrapError, unusedRegOffset, getVersion, compBlank, compExtended, compIgnoreCase, compNoSub, compNewline, execBlank, execNotBOL, execNotEOL) import Text.Regex.TRE.String() import Text.Regex.TRE.Sequence() import Text.Regex.TRE.ByteString() import Text.Regex.TRE.ByteString.Lazy() import Data.Version(Version(..)) import Text.Regex.Base getVersion_Text_Regex_TRE :: Version getVersion_Text_Regex_TRE = Version { versionBranch = [0,91] , versionTags = ["unstable"] }