| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Text.Regex.Do.Type.MatchHint
Documentation
Constructors
| Once a | replace once |
Instances
| Functor Once Source # | |
| Applicative Once Source # | |
| Hint Once Source # | |
| (RegexLike Regex b, Replace Maybe repl b) => Replace Once Regex repl b b Source # | succeeds unless repl: |
| Replace Maybe repl ByteString => Replace Once Regex repl ByteString ByteString Source # | succeeds unless repl: |
| Replace Once Regex String String String Source # | always succeeds |
| (RegexLike Regex b, Regex b) => Replace Once b b b (E b) Source # | b: |
| Replace Once String String String (E String) Source # | |
| Replace Once ByteString ByteString ByteString (E ByteString) Source # | |
| (RegexLike Regex b, Regex b) => Replace Once b (GroupReplacer b) b (E b) Source # | b: |
| Replace Once ByteString (GroupReplacer ByteString) ByteString (E ByteString) Source # | |
Constructors
| All a | replace all |
Instances
| Functor All Source # | |
| Applicative All Source # | |
| Hint All Source # | |
| (RegexLike Regex b, Replace [] repl b) => Replace All Regex repl b b Source # | succeeds unless repl: |
| Replace [] repl ByteString => Replace All Regex repl ByteString ByteString Source # | succeeds unless repl: |
| Replace All Regex String String String Source # | always succeeds |
| (RegexLike Regex b, Regex b) => Replace All b b b (E b) Source # | b: |
| Replace All String String String (E String) Source # | |
| Replace All ByteString ByteString ByteString (E ByteString) Source # | |
| (RegexLike Regex b, Regex b) => Replace All b (GroupReplacer b) b (E b) Source # | b: |
| Replace All ByteString (GroupReplacer ByteString) ByteString (E ByteString) Source # | replacer::GroupReplacer ByteString
replacer = defaultReplacer 1 tweak1
where tweak1 bs1 = toByteString' $
if bs1 == toByteString "左" then
"ー右ー"
else "?"
runFn1 `shouldBe` toByteString "100メートルー右ー折後、左"
where runFn1 = let rx1 = toByteString "(?<=ル)(左)"
body1 = toByteString "100メートル左折後、左"
in replace (All rx1) replacer body1
|