-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | PCRE wrapper
--
-- format, search, replace (String | ByteString) with PCRE regex.
-- Utf8-safe
@package regex-do
@version 3.0
module Text.Regex.Do.Pad
-- | pad String with Char to total length of Int
--
-- pad on left
--
--
-- >>> pad '-' 5 "abc"
--
--
-- "--abc"
pad :: Char -> Int -> String -> String
-- | pad on right
--
--
-- >>> pad' '-' 5 "abc"
--
--
-- "abc--"
pad' :: Char -> Int -> String -> String
module Text.Regex.Do.Type.Do
-- | see Text.Regex.Do.Replace.Open defaultReplacer for
-- example implementation
newtype GroupReplacer b
GroupReplacer :: (MatchArray -> ReplaceAcc b -> ReplaceAcc b) -> GroupReplacer b
data ReplaceAcc b
ReplaceAcc :: b -> Int -> ReplaceAcc b
-- | content with some replacements made
[acc] :: ReplaceAcc b -> b
-- | position adjustment: group replacement length may differ from replaced
-- text length
[pos_adj] :: ReplaceAcc b -> Int
-- | Haystack
data Body b
Body :: b -> Body b
-- | Offset, Length
type PosLen = (MatchOffset, MatchLength)
-- | Left String returns regex construction error
type E a = Either String a
instance GHC.Base.Functor Text.Regex.Do.Type.Do.Body
instance GHC.Base.Functor Text.Regex.Do.Type.Do.ReplaceAcc
instance GHC.Base.Applicative Text.Regex.Do.Type.Do.Body
module Text.Regex.Do.Type.Extract
-- | see String, ByteString instances for implementation examples
--
-- see Text.Regex.Base.RegexLike for Extract detail
class Extract a => Extract' a
concat' :: Extract' a => [a] -> a
len' :: Extract' a => a -> Int
prefix :: Extract a => PosLen -> a -> a
suffix :: Extract a => PosLen -> a -> a
instance Text.Regex.Do.Type.Extract.Extract' GHC.Base.String
instance Text.Regex.Do.Type.Extract.Extract' Data.ByteString.Internal.ByteString
instance Text.Regex.Base.RegexLike.Extract Data.Text.Internal.Text
instance Text.Regex.Do.Type.Extract.Extract' Data.Text.Internal.Text
module Text.Regex.Do.Match.Option
-- | pcre man pages
data Comp
-- | compBlank
--
-- clears default options: extended,caseSensitive,multiline regex
Blank :: Comp
-- | compAnchored
--
-- the pattern is forced to be "anchored", that is, it is constrained to
-- match only at the first matching point in the string that is being
-- searched (the "subject string").
--
-- This effect can also be achieved by appropriate constructs in the
-- pattern itself.
Anchored :: Comp
-- | compCaseless
--
-- letters in the pattern match both upper and lower case letters.
--
-- It is equivalent to Perl's /i option, and it can be changed within a
-- pattern by a (?i) option setting.
--
-- In UTF-8 mode, PCRE always understands the concept of case for
-- characters whose values are less than 128, so caseless matching is
-- always possible. For characters with higher values, the concept of
-- case is supported if PCRE is compiled with Unicode property support.
-- If you want to use caseless matching for characters 128 and above, you
-- must ensure that PCRE is compiled with Unicode property support as
-- well as with UTF-8 support.
Caseless :: Comp
-- | compDotAll
--
-- a dot metacharacter in the pattern matches a character of any value,
-- including one that indicates a newline.
--
-- However, it only ever matches one character, even if newlines are
-- coded as CRLF.
--
-- Without this option, a dot does not match when the current position is
-- at a newline.
--
-- This option is equivalent to Perl's /s option, and it can be changed
-- within a pattern by a (?s) option setting.
--
-- A negative class such as [^a] always matches newline characters,
-- independent of the setting of this option.
Dotall :: Comp
-- | compMultiline
--
-- By default, for the purposes of matching "start of line" and "end of
-- line", PCRE treats the subject string as consisting of a single line
-- of characters, even if it actually contains newlines. The "start of
-- line" metacharacter (^) matches only at the start of the string, and
-- the "end of line" metacharacter ($) matches only at the end of the
-- string, or before a terminating newline (except when
-- PCRE_DOLLAR_ENDONLY is set). Note, however, that unless PCRE_DOTALL is
-- set, the "any character" metacharacter (.) does not match at a
-- newline. This behaviour (for ^, $, and dot) is the same as Perl.
--
-- When PCRE_MULTILINE it is set, the "start of line" and "end of line"
-- constructs match immediately following or immediately before internal
-- newlines in the subject string, respectively, as well as at the very
-- start and end.
--
-- This is equivalent to Perl's /m option, and it can be changed within a
-- pattern by a (?m) option setting.
--
-- If there are no newlines in a subject string, or no occurrences of ^
-- or $ in a pattern, setting PCRE_MULTILINE has no effect.
Multiline :: Comp
-- | compUTF8
--
-- This option causes PCRE to regard both the pattern and the subject as
-- strings of UTF-8 characters instead of single-byte strings. However,
-- it is available only when PCRE is built to include UTF support. If
-- not, the use of this option provokes an error. Details of how this
-- option changes the behaviour of PCRE are given in the pcreunicode
-- page.
Utf8 :: Comp
-- | compUngreedy
--
-- This option inverts the "greediness" of the quantifiers so that they
-- are not greedy by default, but become greedy if followed by "?".
--
-- It can also be set by a (?U) option setting within the pattern.
Ungreedy :: Comp
data Exec
-- | execBlank
--
-- clears default options: extended,caseSensitive,multiline regex
BlankE :: Exec
-- | execNotEmpty
--
-- An empty string is not considered to be a valid match if this option
-- is set. If there are alternatives in the pattern, they are tried. If
-- all the alternatives match the empty string, the entire match fails.
-- For example, if the pattern
--
-- a?b?
--
-- is applied to a string not beginning with "a" or "b", it matches an
-- empty string at the start of the subject. With PCRE_NOTEMPTY set, this
-- match is not valid, so PCRE searches further into the string for
-- occurrences of "a" or "b".
NotEmpty :: Exec
-- | execPartial
--
-- see PCREPARTIAL(3) in pcre man pages
Partial :: Exec
comp :: [Comp] -> CompOption
exec :: [Exec] -> ExecOption
instance GHC.Enum.Enum Text.Regex.Do.Match.Option.Exec
instance GHC.Classes.Ord Text.Regex.Do.Match.Option.Exec
instance GHC.Classes.Eq Text.Regex.Do.Match.Option.Exec
instance GHC.Enum.Enum Text.Regex.Do.Match.Option.Comp
instance GHC.Classes.Ord Text.Regex.Do.Match.Option.Comp
instance GHC.Classes.Eq Text.Regex.Do.Match.Option.Comp
module Text.Regex.Do.Match.Regex
class Regex a
makeRegex :: Regex a => a -> E Regex
makeRegexOpt :: Regex a => a -> [Comp] -> [Exec] -> E Regex
-- | Left String returns regex construction error
type E a = Either String a
instance GHC.Base.Functor Text.Regex.Do.Match.Regex.RegexResult
instance Text.Regex.Do.Match.Regex.Regex Data.ByteString.Internal.ByteString
instance Text.Regex.Do.Match.Regex.Regex GHC.Base.String
instance Text.Regex.Do.Match.Regex.Regex Text.Regex.PCRE.Wrap.Regex
instance GHC.Base.Applicative Text.Regex.Do.Match.Regex.RegexResult
instance GHC.Base.Monad Text.Regex.Do.Match.Regex.RegexResult
module Text.Regex.Do.Type.MatchHint
newtype Test a
-- | test: does body match pattern?
Test :: a -> Test a
newtype Once a
-- | replace once
Once :: a -> Once a
newtype All a
-- | replace all
All :: a -> All a
newtype PosLen' a
-- | once
PosLen' :: a -> PosLen' a
newtype PosLen_ a
-- | all
PosLen_ :: a -> PosLen_ a
class Hint hint
unhint :: Hint hint => hint a -> a
hint :: Hint hint => a -> hint a
instance GHC.Base.Functor Text.Regex.Do.Type.MatchHint.All
instance GHC.Base.Functor Text.Regex.Do.Type.MatchHint.Once
instance Text.Regex.Do.Type.MatchHint.Hint Text.Regex.Do.Type.MatchHint.Test
instance Text.Regex.Do.Type.MatchHint.Hint Text.Regex.Do.Type.MatchHint.Once
instance Text.Regex.Do.Type.MatchHint.Hint Text.Regex.Do.Type.MatchHint.All
instance Text.Regex.Do.Type.MatchHint.Hint Text.Regex.Do.Type.MatchHint.PosLen'
instance Text.Regex.Do.Type.MatchHint.Hint Text.Regex.Do.Type.MatchHint.PosLen_
instance GHC.Base.Applicative Text.Regex.Do.Type.MatchHint.Once
instance GHC.Base.Applicative Text.Regex.Do.Type.MatchHint.All
-- | see Data.ByteString.Search package
--
-- break, split ops on ByteString
--
-- regex is treated as ordinary String
--
-- break & split are now /, -/, /-
--
-- replace moved to Text.Regex.Do.Replace.Fast
module Text.Regex.Do.Split
-- | slices ByteString. drops needle
--
-- to avoid clash with Prelude:
--
--
-- import Prelude hiding((/))
--
--
-- or qualify / with alias e.g. (assuming this module is imported
-- with S alias):
--
--
-- S./
--
--
-- body -> pattern -> result
class Split out
(/) :: Split out => ByteString -> ByteString -> out
-- | keep needle @ front
class SplitFront out
(-/) :: SplitFront out => ByteString -> ByteString -> out
-- | keep needle @ end
class SplitEnd out
(/-) :: SplitEnd out => ByteString -> ByteString -> out
-- | Break result: tuple
type T = (ByteString, ByteString)
-- | Split result: list
type L = [ByteString]
instance Text.Regex.Do.Split.Split (Data.ByteString.Internal.ByteString, Data.ByteString.Internal.ByteString)
instance Text.Regex.Do.Split.SplitFront (Data.ByteString.Internal.ByteString, Data.ByteString.Internal.ByteString)
instance Text.Regex.Do.Split.SplitEnd (Data.ByteString.Internal.ByteString, Data.ByteString.Internal.ByteString)
instance Text.Regex.Do.Split.Split [Data.ByteString.Internal.ByteString]
instance Text.Regex.Do.Split.SplitFront [Data.ByteString.Internal.ByteString]
instance Text.Regex.Do.Split.SplitEnd [Data.ByteString.Internal.ByteString]
-- | simple (no regex) fast replace on ByteStrings
--
-- All occurrences are replaced. There is no Once option
--
-- see replace for detail
module Text.Regex.Do.Replace.Fast
-- |
-- >>> replace "\n" "," "a\nbc\nde"
--
--
-- "a,bc,de"
replace :: ByteString -> ByteString -> ByteString -> ByteString
-- | although sometimes funs in Ascii modules work with non-ascii text (as
-- some examples show), for reliable results with Utf8 pattern or body,
-- use Text.Regex.Do.Match.Utf8
--
-- see also Text.Regex.Base.RegexLike
module Text.Regex.Do.Match.Latin
-- | API changes:
--
-- Once is hinted with ~?
--
-- All is hinted with ~*
--
-- All regex-computing instances catch regex errors, return Either
-- String out (Left String is the error message)
--
--
--
-- String | ByteString pattern may contains regex
--
--
-- - body: String, ByteString
-- - out: out | E out
--
--
-- precompiled Regex may be used as pattern too. see
-- Text.Regex.Do.Match.Utf8
class MatchOnce pattern body out
(~?) :: MatchOnce pattern body out => pattern -> body -> out
-- |
-- - pattern: String, ByteString, Regex
-- - body: String, ByteString
-- - out: out | E
-- out
--
class MatchAll pattern body out
(~*) :: MatchAll pattern body out => pattern -> body -> out
-- | extract takes an offset and length and has a default implementation of
-- extract (off,len) source = before len (after off source)
extract :: Extract source => (Int, Int) -> source -> source
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b => Text.Regex.Do.Match.Latin.MatchOnce Text.Regex.PCRE.Wrap.Regex b [b]
instance (Text.Regex.Do.Match.Regex.Regex b, Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b) => Text.Regex.Do.Match.Latin.MatchOnce b b (Text.Regex.Do.Type.Do.E [b])
instance (Text.Regex.Do.Match.Regex.Regex b, Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b) => Text.Regex.Do.Match.Latin.MatchOnce b b (Text.Regex.Do.Type.Do.E GHC.Types.Bool)
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b => Text.Regex.Do.Match.Latin.MatchOnce Text.Regex.PCRE.Wrap.Regex b GHC.Types.Bool
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b => Text.Regex.Do.Match.Latin.MatchAll Text.Regex.PCRE.Wrap.Regex b [[b]]
instance (Text.Regex.Do.Match.Regex.Regex b, Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b) => Text.Regex.Do.Match.Latin.MatchAll b b (Text.Regex.Do.Type.Do.E [[b]])
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b => Text.Regex.Do.Match.Latin.MatchOnce Text.Regex.PCRE.Wrap.Regex b [Text.Regex.Do.Type.Do.PosLen]
instance (Text.Regex.Do.Match.Regex.Regex b, Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b) => Text.Regex.Do.Match.Latin.MatchOnce b b (Text.Regex.Do.Type.Do.E [Text.Regex.Do.Type.Do.PosLen])
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b => Text.Regex.Do.Match.Latin.MatchAll Text.Regex.PCRE.Wrap.Regex b [[Text.Regex.Do.Type.Do.PosLen]]
instance (Text.Regex.Do.Match.Regex.Regex b, Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b) => Text.Regex.Do.Match.Latin.MatchAll b b (Text.Regex.Do.Type.Do.E [[Text.Regex.Do.Type.Do.PosLen]])
module Text.Regex.Do.Type.Convert
-- | both Ascii and Utf8
toByteString :: String -> ByteString
-- | both Ascii and Utf8
toString :: ByteString -> String
class ToArray a
toArray :: ToArray a => a -> MatchArray
instance Text.Regex.Do.Type.Convert.ToArray Text.Regex.Base.RegexLike.MatchArray
instance Text.Regex.Do.Type.Convert.ToArray [Text.Regex.Do.Type.Do.PosLen]
-- | extensible and reusable replacement functions
--
-- Run replacement with your preferred content types e.g.
-- Data.Text (implemented),
--
-- from search results with non-PCRE regex or non-regex libs
--
-- how to use:
--
-- value replacement:
--
--
-- >>> replace (Just [(4,3)::PosLen]) "4567" ("abc 123 def"::Text)
--
--
-- "abc 4567 def"
--
-- GroupReplacer : replace with a function
--
--
-- replacer::GroupReplacer Text
-- replacer = defaultReplacer 1 tweak1 -- 1: group 1 match.
-- where tweak1 str1 = case str1 of
-- "123" -> "[1-2-3]"
-- otherwise -> traceShow str1 "?"
--
--
--
-- >>> replace (Just ([(4,3)]::[PosLen])) replacer ("abc 123 def"::Text)
--
--
-- "abc [1-2-3] def"
module Text.Regex.Do.Replace.Open
class Replace f repl body
replace :: (Replace f repl body, Extract' body, ToArray arr) => f arr -> repl -> body -> body
-- | Replaces specified (by idx) group match with value provided by (a
-- -> a) fn. Works for one common simple use case
--
-- GroupReplacer can also be used with multi-group regex
--
-- another custom dynamic replacer could e.g. inspect all group matches
-- before looking up a replacement.
defaultReplacer :: Extract' a => Int -> (a -> a) -> GroupReplacer a
-- | get group content safely:
--
--
-- - non-existing group idx will not error but return
-- Nothing
-- - adjust for previous replacements length
--
--
-- see defaultReplacer source for use example
getGroup :: Extract a => ReplaceAcc a -> MatchArray -> Int -> Maybe a
-- | replace group match while adjusting for previous replacements length
--
-- see defaultReplacer source for use example
replaceMatch :: Extract' a => PosLen -> (a, ReplaceAcc a) -> ReplaceAcc a
instance Text.Regex.Do.Replace.Open.Replace GHC.Base.Maybe b b
instance Text.Regex.Do.Replace.Open.Replace [] b b
instance Text.Regex.Do.Replace.Open.Replace GHC.Base.Maybe (Text.Regex.Do.Type.Do.GroupReplacer b) b
instance Text.Regex.Do.Replace.Open.Replace [] (Text.Regex.Do.Type.Do.GroupReplacer b) b
-- | for reliable results with Utf8 pattern or body, use
-- Text.Regex.Do.Replace.Utf8
module Text.Regex.Do.Replace.Latin
-- | hint: All | Once
--
-- pattern: Regex, String, ByteString
--
-- String | ByteString pattern may contains regex
--
-- body: String, ByteString
--
-- result is Either String body: Left String returns regex
-- construction errors.
class Replace hint pattern repl body out
replace :: (Replace hint pattern repl body out, Extract' body, RegexLike Regex body) => hint pattern -> repl -> body -> out
instance (Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b, Text.Regex.Do.Replace.Open.Replace GHC.Base.Maybe repl b) => Text.Regex.Do.Replace.Latin.Replace Text.Regex.Do.Type.MatchHint.Once Text.Regex.PCRE.Wrap.Regex repl b b
instance (Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b, Text.Regex.Do.Replace.Open.Replace [] repl b) => Text.Regex.Do.Replace.Latin.Replace Text.Regex.Do.Type.MatchHint.All Text.Regex.PCRE.Wrap.Regex repl b b
instance (Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b, Text.Regex.Do.Match.Regex.Regex b) => Text.Regex.Do.Replace.Latin.Replace Text.Regex.Do.Type.MatchHint.Once b b b (Text.Regex.Do.Type.Do.E b)
instance (Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b, Text.Regex.Do.Match.Regex.Regex b) => Text.Regex.Do.Replace.Latin.Replace Text.Regex.Do.Type.MatchHint.Once b (Text.Regex.Do.Type.Do.GroupReplacer b) b (Text.Regex.Do.Type.Do.E b)
instance (Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b, Text.Regex.Do.Match.Regex.Regex b) => Text.Regex.Do.Replace.Latin.Replace Text.Regex.Do.Type.MatchHint.All b b b (Text.Regex.Do.Type.Do.E b)
instance (Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b, Text.Regex.Do.Match.Regex.Regex b) => Text.Regex.Do.Replace.Latin.Replace Text.Regex.Do.Type.MatchHint.All b (Text.Regex.Do.Type.Do.GroupReplacer b) b (Text.Regex.Do.Type.Do.E b)
-- | see also Text.Regex.Do.Replace.Latin
--
-- toByteString converts String to ByteString
module Text.Regex.Do.Replace.Utf8
-- | see Text.Regex.Do.Replace.Latin for implemented types
--
-- GroupReplacer is implemented only for ByteString
class Replace hint pattern repl body out
replace :: (Replace hint pattern repl body out, Extract' body, RegexLike Regex body) => hint pattern -> repl -> body -> out
instance Text.Regex.Do.Replace.Utf8.Replace Text.Regex.Do.Type.MatchHint.Once Text.Regex.PCRE.Wrap.Regex GHC.Base.String GHC.Base.String GHC.Base.String
instance Text.Regex.Do.Replace.Utf8.Replace Text.Regex.Do.Type.MatchHint.All Text.Regex.PCRE.Wrap.Regex GHC.Base.String GHC.Base.String GHC.Base.String
instance Text.Regex.Do.Replace.Open.Replace GHC.Base.Maybe repl Data.ByteString.Internal.ByteString => Text.Regex.Do.Replace.Utf8.Replace Text.Regex.Do.Type.MatchHint.Once Text.Regex.PCRE.Wrap.Regex repl Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString
instance Text.Regex.Do.Replace.Open.Replace [] repl Data.ByteString.Internal.ByteString => Text.Regex.Do.Replace.Utf8.Replace Text.Regex.Do.Type.MatchHint.All Text.Regex.PCRE.Wrap.Regex repl Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString
instance Text.Regex.Do.Replace.Utf8.Replace Text.Regex.Do.Type.MatchHint.Once GHC.Base.String GHC.Base.String GHC.Base.String (Text.Regex.Do.Type.Do.E GHC.Base.String)
instance Text.Regex.Do.Replace.Utf8.Replace Text.Regex.Do.Type.MatchHint.All GHC.Base.String GHC.Base.String GHC.Base.String (Text.Regex.Do.Type.Do.E GHC.Base.String)
instance Text.Regex.Do.Replace.Utf8.Replace Text.Regex.Do.Type.MatchHint.Once Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString (Text.Regex.Do.Type.Do.E Data.ByteString.Internal.ByteString)
instance Text.Regex.Do.Replace.Utf8.Replace Text.Regex.Do.Type.MatchHint.All Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString (Text.Regex.Do.Type.Do.E Data.ByteString.Internal.ByteString)
instance Text.Regex.Do.Replace.Utf8.Replace Text.Regex.Do.Type.MatchHint.Once Data.ByteString.Internal.ByteString (Text.Regex.Do.Type.Do.GroupReplacer Data.ByteString.Internal.ByteString) Data.ByteString.Internal.ByteString (Text.Regex.Do.Type.Do.E Data.ByteString.Internal.ByteString)
instance Text.Regex.Do.Replace.Utf8.Replace Text.Regex.Do.Type.MatchHint.All Data.ByteString.Internal.ByteString (Text.Regex.Do.Type.Do.GroupReplacer Data.ByteString.Internal.ByteString) Data.ByteString.Internal.ByteString (Text.Regex.Do.Type.Do.E Data.ByteString.Internal.ByteString)
-- | formerly Format
--
-- substitutes placeholder values with values from args
--
-- in lieu of format function there are 2 operators: <
-- and >: no need to remember arg order.
--
-- placeholder syntax:
--
--
--
--
--
-- other placeholders may be implemented with
--
-- Text.Regex.Do.Replace.Latin or
-- Text.Regex.Do.Replace.Utf8
--
-- to avoid clash with Prelude:
--
--
-- import Prelude hiding((<),(>))
--
--
-- or qualify < with alias e.g. (assuming this module is
-- imported with F alias):
--
--
-- F.<
--
module Text.Regex.Do.Replace.Template
-- | implemented a:
--
--
--
-- a: template e.g. "today is {0}"
--
-- repl: replacement: [a] or [(a,a)]
class Template a repl where (>) repl0 template0 = template0 < repl0
(<) :: Template a repl => a -> repl -> a
(>) :: Template a repl => repl -> a -> a
class ReplaceOne idx a
type Formatable a = (Template a [a], Template a [(a, a)])
instance Text.Regex.Do.Replace.Template.ReplaceOne GHC.Types.Int a => Text.Regex.Do.Replace.Template.Template a [a]
instance Text.Regex.Do.Replace.Template.ReplaceOne a a => Text.Regex.Do.Replace.Template.Template a [(a, a)]
instance Text.Regex.Do.Replace.Template.ReplaceOne GHC.Types.Int GHC.Base.String
instance Text.Regex.Do.Replace.Template.ReplaceOne GHC.Base.String GHC.Base.String
instance Text.Regex.Do.Replace.Template.ReplaceOne GHC.Types.Int Data.ByteString.Internal.ByteString
instance Text.Regex.Do.Replace.Template.ReplaceOne Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString
instance Text.Regex.Do.Replace.Template.ReplaceOne GHC.Types.Int Data.Text.Internal.Text
instance Text.Regex.Do.Replace.Template.ReplaceOne Data.Text.Internal.Text Data.Text.Internal.Text
-- | see Text.Regex.Base.RegexLike
--
-- see Text.Regex.Do.Match.Latin for API changes
--
-- toByteString converts String to utf8 ByteString
module Text.Regex.Do.Match.Utf8
-- |
class MatchOnce pattern body out
(~?) :: MatchOnce pattern body out => pattern -> body -> out
-- |
class MatchAll pattern body out
(~*) :: MatchAll pattern body out => pattern -> body -> out
-- | extract takes an offset and length and has a default implementation of
-- extract (off,len) source = before len (after off source)
extract :: Extract source => (Int, Int) -> source -> source
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b => Text.Regex.Do.Match.Utf8.MatchOnce Text.Regex.PCRE.Wrap.Regex b [b]
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b => Text.Regex.Do.Match.Utf8.MatchOnce Text.Regex.PCRE.Wrap.Regex b GHC.Types.Bool
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b => Text.Regex.Do.Match.Utf8.MatchOnce Text.Regex.PCRE.Wrap.Regex b [Text.Regex.Do.Type.Do.PosLen]
instance Text.Regex.Do.Match.Utf8.MatchOnce GHC.Base.String GHC.Base.String (Text.Regex.Do.Type.Do.E [GHC.Base.String])
instance Text.Regex.Do.Match.Utf8.MatchOnce Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString (Text.Regex.Do.Type.Do.E [Data.ByteString.Internal.ByteString])
instance Text.Regex.Do.Match.Utf8.MatchOnce GHC.Base.String GHC.Base.String (Text.Regex.Do.Type.Do.E GHC.Types.Bool)
instance Text.Regex.Do.Match.Utf8.MatchOnce Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString (Text.Regex.Do.Type.Do.E GHC.Types.Bool)
instance Text.Regex.Do.Match.Utf8.MatchOnce Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString (Text.Regex.Do.Type.Do.E [Text.Regex.Do.Type.Do.PosLen])
instance Text.Regex.Do.Match.Utf8.MatchOnce GHC.Base.String GHC.Base.String (Text.Regex.Do.Type.Do.E [Text.Regex.Do.Type.Do.PosLen])
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b => Text.Regex.Do.Match.Utf8.MatchAll Text.Regex.PCRE.Wrap.Regex b [[b]]
instance Text.Regex.Do.Match.Utf8.MatchAll Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString (Text.Regex.Do.Type.Do.E [[Data.ByteString.Internal.ByteString]])
instance Text.Regex.Do.Match.Utf8.MatchAll GHC.Base.String GHC.Base.String (Text.Regex.Do.Type.Do.E [[GHC.Base.String]])
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex b => Text.Regex.Do.Match.Utf8.MatchAll Text.Regex.PCRE.Wrap.Regex b [[Text.Regex.Do.Type.Do.PosLen]]
instance Text.Regex.Do.Match.Utf8.MatchAll GHC.Base.String GHC.Base.String (Text.Regex.Do.Type.Do.E [[Text.Regex.Do.Type.Do.PosLen]])
instance Text.Regex.Do.Match.Utf8.MatchAll Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString (Text.Regex.Do.Type.Do.E [[Text.Regex.Do.Type.Do.PosLen]])
instance Text.Regex.Do.Match.Utf8.WithRegex Data.ByteString.Internal.ByteString out out
instance Text.Regex.Do.Match.Utf8.WithRegex GHC.Base.String [Data.ByteString.Internal.ByteString] [GHC.Base.String]
instance Text.Regex.Do.Match.Utf8.WithRegex GHC.Base.String [[Data.ByteString.Internal.ByteString]] [[GHC.Base.String]]
instance Text.Regex.Do.Match.Utf8.WithRegex GHC.Base.String GHC.Types.Bool GHC.Types.Bool
module Text.Regex.Do.Trim
-- | removes leading and trailing spaces and tabs
class Trim a
trim :: Trim a => a -> a
-- | see strip
instance Text.Regex.Do.Trim.Trim Data.ByteString.Internal.ByteString
instance Text.Regex.Do.Trim.Trim GHC.Base.String
instance Text.Regex.Do.Trim.Trim Data.Text.Internal.Text