| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Text.Regex.Do.Pcre.Ascii.Replace
Description
for reliable results with Utf8 pattern or body, use Text.Regex.Do.Pcre.Utf8.Replace
Documentation
class Replace pat repl body out where Source
All | Once needs to be specified once with either pat, repl or body
to catch regex construction errors, precompile Regex with makeRegexM or makeRegexOptM
repl: b:
String|ByteString- (
Replacementb) - (
GroupReplacerb) - (
All|Once(Replacementb)) - (
All|Once(GroupReplacerb))
- (
body: b:
String|ByteStringout:
String|ByteString
Instances
| (Regex a, Hint all, Replace' all a repl b) => Replace a (all (repl b)) b b Source | hint repl
|
| (Regex a, Replace' All a repl b) => Replace a (repl b) (All b) b Source | hint |
| (Regex a, Replace' Once a repl b) => Replace a (repl b) (Once b) b Source | hint
|
| (Regex a, Hint all, Replace' all a repl b, Functor all) => Replace (all a) (repl b) b b Source | hint
|
| (Regex a, Hint all, Replace' all a repl b) => Replace (all (Pattern a)) (repl b) (Body b) b Source | full typed arg
|
class Replace' all a repl b Source
internal class & instances
use replace instead
Minimal complete definition
replace'
Instances
| Repl_ [] a repl b => Replace' All a repl b Source | to tweak regex with dynamic group replacecustom replacer fn returns replacement value. See
"a=[1 0 1] b=[ 3 ] 12" |
| Repl_ Maybe a repl b => Replace' Once a repl b Source | static replace for simple (no group) needlefor no-regex
"Abc" dynamic group replace
"a=[1 0 1] b=3 12" |