AE;2L      !"#$%&'()*+,-./0123456789:;<=>?@ABCDE F G H I J K None &)-3457NLMLMNone &)-3457N NO P Q R STUVW XY     XYSafe &)-3457Nboth Ascii and Utf8both Ascii and Utf8Safe &)-3457Nmay be omitted-if both Once and All are passed, All prevails  !"  !" " ! !"None &)-3457N &_ctr: constraint'see Regexdo.Pcre.Result for funs converting  to something useful(& returns the first occurrence - if any+tweak Regex with options/this instance accepts  made with +0this instance accepts  made with +1this instance accepts regex Z2this instance accepts regex Z3this instance accepts regex [4this instance accepts regex [)matchTest (Needle "^ab") (Haystack "abc")True#$%&'()*+,-./01234 #$%&'()*+'()*+43210/.-,&%#$#$%&'()*+,-./01234Safe &)-3457N6 all matches73extracts all values in a MatchArray (matched group)567567567567None &)-3457N8dynamic group replace,custom replacer fn returns replacement valuereplacer::GroupReplacer String' replacer = defaultReplacer 3 tweak1* where tweak1 str1 = case str1 of- "101" -> "[A]", "3" -> "[Be]" vs  optionsUreplaceGroup [Once] (Needle "(\\w)(=)(\\d{1,3})", replacer) $ Haystack "a=101 b=3 12""a=[A] b=3 12"TreplaceGroup [All] (Needle "(\\w)(=)(\\d{1,3})", replacer) $ Haystack "a=101 b=3 12""a=[A] b=[Be] 12"+static replace for simple (no group) needleSreplace [Once,Utf8] (Needle "<5=55", Replacement "1>;55") (Haystack "<5=55 <5=55") "1>;55 <5=55"Preplace [Once,Utf8] (Needle "^a\\s", Replacement "A") (Haystack "a bc E>;.3>@.")"Abc E>;.3>@." <use in your custom " passed to :"see example replacer above or use ==6replace with a tweak to specified (by idx) group matchsee =/ source for hints: how to write custom replacer89:\]^_`a;<(new val, acc passed to ")new accbcd=idx of match within a group"(group match -> replacement) tweakefghijklm 89:;<= 89:<=;89:\]^_`a;<bcd=efghijklmNone &)-3457N>(front, end) : drop needle+break (Needle ":") (Haystack "0123:oid:90")("0123", "oid:90")*break (Needle "\n") (Haystack "a\nbc\nde")("a", "bc\nde") ?(front, needle + end)/breakFront (Needle "\n") (Haystack "a\nbc\nde")("a", "\nbc\nde") @(front + needle, end)-breakEnd (Needle "\n") (Haystack "a\nbc\nde")("a\n", "bc\nde") A>replace (Needle "\n") (Replacement ",") (Haystack "a\nbc\nde")"a,bc,de" B*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 "] C-splitEnd (Needle "\n") (Haystack "a\nbc\nde")["a\n", "bc\n", "de"] D/splitFront (Needle "\n") (Haystack "a\nbc\nde")["a", "\nbc", "\nde"] >?@ABCDn>?@ABCD>?@ABCD>?@ABCDn None &)-3457NG+pad String with Char to total length of Intpad '-' 5 "abc""--abc"o 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"p 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" qEFrstGuvopEFGGEF qEFrstGuvop None &)-3457NH/removes leading and trailing spaces and tabs HIJKHIHIKJHIJKw   !"#$%&'(())**+,-./0123456789:;<=>?@ABCDEFGHIBJKL M N O P Q R STUVWXYZ[\]^_`abcdefghijklmnopqrs tuvwxy z { | } ~  regex_E4xcsL0PBgYHlpj5ab1KyxRegexdo.TypeRegexRegexdo.Pcre.ResultRegexdo.Pcre.OptionRegexdo.ConvertRegexdo.TypeDoRegexdo.Pcre.MatchRegexdo.Pcre.ReplaceRegexdo.SearchRegexdo.Format Regexdo.Trimregex_47KXx9dLqeO8MNJeizLKhPText.Regex.Base.RegexLike MatchArrayextractregex_D90DoxwgsTHEvoLrkciZPUText.Regex.PCRE.Wrap CompOption ExecOptionRegexExecBlankENotEmptyPartialCompBlankAnchoredCaselessDotall MultilineUtf8Ungreedycompexec toByteStringtoString ReplaceCaseOnceAllPosLen ReplacementHaystackNeedle GroupReplacerNeedle_r_ Match_opt Match_ctrMatch_clmatch matchTestmatchAll makeRegexOpts$fNeedle_Regex $fNeedle_[]$fNeedle_ByteString$fMatch_clRegexByteString$fMatch_clRegex[]$fMatch_clByteString[]$fMatch_clByteStringByteString$fMatch_cl[]ByteString$fMatch_cl[][]poslenvalue oneMatchArray Replace_clreplace replaceGroupMr replaceMatchdefaultReplacerbreak breakFrontbreakEndsplitsplitEnd splitFrontFormatformatpadTrimtrim$fTrim[]$fTrimByteStringRegexSRegexB execBlank execNotEmpty execPartial compBlank compAnchored compCaseless compDotAll compMultilinecompUTF8 compUngreedycompOptexecOptbytes_6VWy06pWzJq9evDvK2d4w6Data.ByteString.Internal ByteStringbaseGHC.BaseString Replace_cl'prefixsuffixconcat' toByteString'toAroncerall firstGroup ronceGroup rallGroupaddOptisUtf8$fReplace_cl'ByteString$fReplace_clByteString$fReplace_cl'[]$fReplace_cl[] checkPattern $fFormat[] $fFormat[]0 CustomerFn foldFn_idx foldFn_map replaceOne foldr_idxfoldFn