úÎA';.J      !"#$%&'()*+,-./0123456789:;<= > ? @ A B C D E F G H I None&)3457JKJKNone&)3457 LM N O P QRSTU VW     VWSafe&)3457both Ascii and Utf8both Ascii and Utf8Safe &)-3457None&)3457 _ctr: constraint"see Regexdo.Pcre.Result for funs converting  to something useful#% returns the first occurence - if any&tweak Regex with options*this instance accepts  made with &+this instance accepts  made with &,this instance accepts regex X-this instance accepts regex X.this instance accepts regex Y/this instance accepts regex Y)matchTest (Needle "^ab") (Haystack "abc")True !"#$%&'()*+,-./  !"#$%&"#$%&/.-,+* !)(' !"#$%&'()*+,-./Safe&)34571 all matches23extracts all values in a MatchArray (matched group)012012012012None&)34573 lose needle+break (Needle ":") (Haystack "0123:oid:90")("0123", "oid:90")*break (Needle "\n") (Haystack "a\nbc\nde")("a", "bc\nde") 4(front, needle + end)/breakFront (Needle "\n") (Haystack "a\nbc\nde")("a", "\nbc\nde") 5(front + needle, end)-breakEnd (Needle "\n") (Haystack "a\nbc\nde")("a\n", "bc\nde") 6>replace (Needle "\n") (Replacement ",") (Haystack "a\nbc\nde")"a,bc,de" 7*split (Needle "\n") (Haystack "a\nbc\nde")["a", "bc", "de"]'split (Needle " ") (Haystack "a bc de")["a", "bc", "de"].split (Needle "\\s") (Haystack "abc de fghi ")["abc de fghi "] 8-splitEnd (Needle "\n") (Haystack "a\nbc\nde")["a\n", "bc\n", "de"] 9/splitFront (Needle "\n") (Haystack "a\nbc\nde")["a", "\nbc", "\nde"] 3456789Z345678934567893456789ZNone&)3457<+pad String with Char to total length of Intpad '-' 5 "abc""--abc"[ key basedkey may be {any string};format ">2G8=:0 {a} =5 {b}" [("a","2K45;:8"),("b","AB>8B")]">2G8=:0 2K45;:8 =5 AB>8B"\ index based2format "=0 ?5@2>5 {0}, =0 2B>@>5 {0}" ["?5@;>2:0"]("=0 ?5@2>5 ?5@;>2:0, =0 2B>@>5 ?5@;>2:0"*format "Polly {0} a {1}" ["got","cracker"]"Polly got a cracker" ]:;^_`<ab[\:;<<:; ]:;^_`<ab[\ None&)3457Duse in your custom  passed to Esee example replacer aboveEdynamic group replace,custom replacer fn returns replacement valuereplacer::GroupReplacer String& replacer marr1 acc1 = case val1 of- "101" -> fn1 "[A]", "3" -> fn1 "[Be]"7 where ol1 = marr1 ! 3 :: (MatchOffset, MatchLength)! val1 = extract ol1 acc11 fn1 str1 = replaceMatch ol1 (str1,acc1)see below test compares @ vs A optionsgroupReplace::IO()  groupReplace = hspec $ do* describe "Pcre.Replace group" $ do it "Once" $ do6 runFn1 [Once] `shouldBe` "a=[A] b=3 12" it "All" $ do8 runFn1 [All] `shouldBe` "a=[A] b=[Be] 12" where runFn1 opts1 =< let rx1 = Needle "(\\w)(=)(\\d{1,3})": body1 = Haystack "a=101 b=3 12"? in replaceGroup opts1 (rx1,replacer) body1c]replace [Once,Utf8] (Needle "?>?", Replacement ":@5ABLO=8=") (Haystack "C ?>?0 1K;0 A>10:0")"C :@5ABLO=8=0 1K;0 A>10:0"Preplace [Once,Utf8] (Needle "^a\\s", Replacement "A") (Haystack "a bc E>;.3>@.")"Abc E>;.3>@."defg=>hi?@ABCjklmD(new val, acc passed to )Enopqrstc =>?@ABCDE ?@ABC=>EDdefg=>hi?@ABCjklmDEnopqrstc None&)3457F/removes leading and trailing spaces and tabs FGHIFGFGIHFGHIu   !"#$%%&&''()*+,-./0123456789:;<=>?@ABCDEFG H A I J K   L M N O P QRSTUVWXYZ[\]^_`abcdefghijklmn o p q r s t u v w x y z { | } ~ €regex_2N8vMq5oDE9IAbKR93j0UyRegexdo.TypeRegexRegexdo.Pcre.ResultRegexdo.Pcre.OptionRegexdo.ConvertRegexdo.TypeDoRegexdo.Pcre.MatchRegexdo.SearchRegexdo.FormatRegexdo.Pcre.Replace Regexdo.Trimregex_47KXx9dLqeO8MNJeizLKhPText.Regex.Base.RegexLike MatchArrayextractregex_D90DoxwgsTHEvoLrkciZPUText.Regex.PCRE.Wrap CompOption ExecOptionRegexExecBlankENotEmptyPartialCompBlankAnchoredCaselessDotall MultilineUtf8Ungreedycompexec toByteStringtoStringPosLen ReplacementHaystackNeedle GroupReplacer Match_opt Match_ctrNeedle_r_Match_clmatch matchTestmatchAll makeRegexOpts$fNeedle_Regex $fNeedle_[]$fNeedle_ByteString$fMatch_clRegexByteString$fMatch_clRegex[]$fMatch_clByteString[]$fMatch_clByteStringByteString$fMatch_cl[]ByteString$fMatch_cl[][]poslenvalue oneMatchArraybreak breakFrontbreakEndreplacesplitsplitEnd splitFrontFormatformatpad Replace_cl ReplaceCaseOnceAll replaceMatch replaceGroupTrimtrim$fTrim[]$fTrimByteStringRegexSRegexB execBlank execNotEmpty execPartial compBlank compAnchored compCaseless compDotAll compMultilinecompUTF8 compUngreedycompOptexecOptbytes_6VWy06pWzJq9evDvK2d4w6Data.ByteString.Internal ByteStringbaseGHC.BaseString checkPattern $fFormat[] $fFormat[]0 CustomerFn foldFn_idx foldFn_map replaceOne foldr_idxfoldFn$fReplace_cl[] Replace_cl'prefixsuffixconcat'RmMmaddOptroncerall firstGroup ronceGroup rallGroupisUtf8$fReplace_cl'ByteString$fReplace_clByteString$fReplace_cl'[]