File: Replace.hs

package info (click to toggle)
haskell-regex 1.1.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 424 kB
  • sloc: haskell: 4,533; makefile: 3
file content (73 lines) | stat: -rw-r--r-- 1,619 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
module Text.RE.Replace
  (
  -- * The Replacing Tutorial
  -- $tutorial

  -- * replaceAll
    replaceAll
  , replaceAllCaptures
  , replaceAllCaptures_
  , replaceAllCapturesM
  -- * replace
  , replace
  , replaceCaptures
  , replaceCaptures_
  , replaceCapturesM
  -- * REContext and RELocation
  , REContext(..)
  , RELocation(..)
  , isTopLocation
  -- * Matches
  , Matches(..)
  , anyMatches
  , countMatches
  , matches
  , mainCaptures
  -- * Match
  , Match(..)
  , noMatch
  , emptyMatchArray
  , matched
  , matchedText
  , matchCapture
  , matchCaptures
  , (!$$)
  , captureText
  , (!$$?)
  , captureTextMaybe
  , (!$)
  , capture
  , (!$?)
  , captureMaybe
  , convertMatchText
  -- * Capture
  , Capture(..)
  , hasCaptured
  , capturePrefix
  , captureSuffix
  -- * CaptureID
  , CaptureID(..)
  , CaptureNames
  , noCaptureNames
  , CaptureName(..)
  , CaptureOrdinal(..)
  , findCaptureID
  -- * Replace and ReplaceMethods
  , Replace(..)
  , ReplaceMethods(..)
  , replaceMethods
  ) where

import           Text.RE.ZeInternals.Replace
import           Text.RE.ZeInternals.Types.Capture
import           Text.RE.ZeInternals.Types.CaptureID
import           Text.RE.ZeInternals.Types.Match
import           Text.RE.ZeInternals.Types.Matches

-- $tutorial
-- This API module covers the specialised regex tools for doing general
-- editing on text, including the internal details of the 'Matches' and
-- 'Match' types and the associated functions for extracting captures
-- and applying functions to them to transform the subject text.
--
-- See the tutorials at http://re-tutorial-replacing.regex.uk