!"      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                             ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L MNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                       /(C) 2016-17 Chris DornanBSD3 (see the LICENSE file)+Chris Dornan <chris.dornan@irisconnect.com>RFCportableSafeTNone@ACM.regexMacroID is just a wrapped String type with an IsString instanceregex5our macro tables are parameterised over the back end RE# type and and just associate each MacroID with an RE3 (which may in turn contain macros to be expanded)regexlthe general options for an RE are dependent on which back end is being used and are parameterised over the RE! type for the back end, and its  CompOption and  ExecOptionc types (the compile-time and execution time options, respectively); each back end will define an  REOptions_ type that fills out these three type parameters with the apropriate types (see, for example,  Text.RE.TDFA)regex!the available TestBench RE macrosregex!the back end compile-time optionsregex#the back end execution-time options regexpthe default API uses these simple, universal RE options, which get auto-converted into the apropriate back-end  regex@case-sensitive with ^ and $ matching the start and end of a line regex?case-insensitive with ^ and $ matsh the start and end of a line regexHcase-sensitive with ^ and $ matching the start and end of the input text regexJcase-insensitive with ^ and $ matching the start and end of the input textregex#a macro table containing no entriesregex4we need to use this in the quasi quoters to specify SimpleREOptions selected by the quasi quoterregexMacroID is used with  HM.HashMap to build macro lookup tables  Safe2regexGConvert a string into a regular expression that will match that stringregex=returns True iff the charactr is an RE meta character ('[',  , '{', etc.)Safe26regex?used to throw an exception reporting an abuse of a quasi quoterregex)in what context was the quasi quoter usedregex%how was the quasi quoter being abused regexha quasi quoter that can be used in no context (to be extended with the appropriate quasi quoter parser) Safe"#2=?@A>p!regexHthe matching of a single sub-expression against part of the source text#regex the whole text that was searched$regexthe text that was matched%regexythe number of characters preceding the match with -1 used if no text was captured by the RE (not even the empty string)&regex1the number of chacter in the captured sub-string'regex(test if the capture has matched any text(regex$returns the text preceding the match)regex returns the text after the match !"#$%&'()NoneME*regexa *t is just the number of the capture, starting with 0 for the whole of the text matched, then in leftmost, outermost-regexa - is just the text of the name0regexTthe dictionary for named captures stored in compiled regular expressions associates1regex[CaptureID identifies captures, either by number (e.g., [cp|1|]) or name (e.g., [cp|foo|]).4regex an empty 0 dictionary5regex look up a 1 in the 0 dictionary *+,-./013245NoneMH6regex2our line numbers are of the proper zero-based kind9regexthe first line in a file:regex*extract a conventional 1-based line number;regex)inject a conventional 1-based line number6789:;None "#2=?@Ad+<regex1the result of matching a RE to a text once (with ?=~/), retaining the text that was matched against>regexthe whole source text?regexthe RE's capture names@regex @.n-1 captures, starting with the text matched by the whole REAregex/Construct a Match that does not match anything.Bregexan empty array of CaptureCregex3tests whether the RE matched the source text at allDregex6yields the text matched by the RE, Nothing if no matchEregexKthe top-level capture if the source text matched the RE, Nothing otherwiseFregex\the main top-level capture (capture '0'') and the sub captures if the text matched the RE, Nothing otherwiseGregexan alternative for captureTextHregexlook up the text of the nth capture, 0 being the match of the whole RE against the source text, 1, the first bracketed sub-expression to be matched and so onIregex#an alternative for captureTextMaybeJregexlook up the text of the nth capture (0 being the match of the whole), returning Nothing if the Match doesn't contain the captureKregexan alternative for captureLregexlook up the nth capture, 0 being the match of the whole RE against the source text, 1, the first bracketed sub-expression to be matched and so onMregex'an alternative for capture captureMaybeNregexlook up the nth capture, 0 being the match of the whole RE against the source text, 1, the first bracketed sub-expression to be matched and so on, returning Nothing if there is no such capture, or if the capture failed to capture anything (being in a failed alternate)Oregex=convert a regex-base native MatchText into a regex Match typeregexthis instance hooks <C into regex-base: regex consumers need not worry about any of this<=>?@ABCDEFGHIJKLMNOG9 K9 None "#2=?@Al5Pregex1the result of matching a RE against a text (with *=~/), retaining the text that was matched againstRregexthe source text being matchedSregexall < instances found, left to rightTregex3tests whether the RE matched the source text at allUregexcount the matchesVregexlist the texts that MatchedWregex(extract the main capture from each matchregexthis instance hooks PC into regex-base: regex consumers need not worry about any of thisPQRSTUVWNone"#=>?O"Xregexua selction of the Replace methods can be encapsulated with ReplaceMethods for the higher-order replacement functions\regexFReplace provides the missing needed to replace the matched text in a Replace a => Match a.]regexlength function for a^regexinject String into a_regexproject a onto a String`regexinject into Textaregexproject Text onto abregexsplit into linescregexconcatenate a list of linesdregexappend a newlineeregex*apply a substitution function to a CapturefregexKconvert a template containing $0, $1, etc., in the first argument, into a phiJ replacement function for use with replaceAllCaptures and replaceCapturesgregexthe  RELocationg information passed into the substitution function specifies which sub-expression is being substitutediregexxthe zero-based, i-th string to be matched, when matching all strings, zero when only the first string is being matchedjregex0, when matching the top-level string matched by the whole RE, 1 for the top-most, left-most redex captured by bracketed sub-REs, etc.kregex REContext= specifies which contexts the substitutions should be appliedlregexZsubstitutions should be applied to the top-level only, the text that matched the whole REmregexOsubstitutions should only be applied to the text captured by bracketed sub-REsnregexkthe substitution function should be applied to all captures, the top level and the sub-expression capturesoregexRTrue iff the location references a complete match (i.e., not a bracketed capture)pregexKreplace all with a template, $0 for whole text, $1 for first capture, etc.qregexsubstitutes using a function that takes the full Match context and returns the same replacement text as the _phi_phi context.rregexvreplaceAllCaptures_ is like like replaceAllCaptures but takes the Replace methods through the ReplaceMethods argumentsregexUreplaceAllCapturesM is just a monadically generalised version of replaceAllCaptures_uregexsubstitutes using a function that takes the full Match context and returns the same replacement text as the _phi_phi context.vregexkreplaceCaptures_ is like replaceCaptures but takes the Replace methods through the ReplaceMethods argumentwregexOreplaceCapturesM is just a monadically generalised version of replaceCaptures_xregexexpand all of the @{..} macros in the RE in the argument String according to the Macros argument, preprocessing the RE String according to the Mode argument (used internally)regexGexpand the @{..} macos in the argument string using the given functionregexTlist all of the CaptureID references in the replace template in the second argumentregex4parse a Match generated by acan_template, returning 3Left "$") iff the capture reference is an escaped $ (i.e., $$@)regexlscan a replacement template, returning a Match for each capture reference in the template (like $1, ${foo})yregexEreplaceMethods encapsulates ReplaceMethods a from a Replace a contextregexGparse the replacement template in second argument, substititing the capture references with corresponding captures from the Match in the third argument (the result of a single match of the RE against the input text to be matched); Nothing is returned if the inputs are not well formed (currently all inputs are well formed)$XY[Z\f]^_`abcdeghijklmnopqrstuvwxyNone"#Mregexwe are only interested in the open parentheses used for grouping and/or capturing; if neither grouping or capturing then there is no initial '(' or '(?:', just the suffic textregex following text optional ( or (?:regex a '(' that is not safe to modifyregexis this a grouping groupregexis this a capturing groupregexLname of the Haskell parser function for parsing the text matched by a macrozregexa RE that should work for POSIX and PCRE with open brackets ('(') represented as follows: ( mere symbol (?: used for grouping only, not for captures (}: used for captures only, not for grouping (]: used for captures and grouping ( do not modifyregex$list of failures on a validation run}regexIdescribes a macro, giving the text of the RE and a si=ummary descriptionregexthe REregexsome sample matchesregexsome sample non-matchesregexvalidation test resultsregexWA, the parser functionregexsummary commentregexoeach macro can reference others, the whole environment being required for each macro, so we use a Lazy HashMapregexPdo we need the captures in the RE or whould they be stripped out where possibleregexinclude all capturesregexremove captures where possibleregex)what flavour of regex are we dealing withregex test RegexType for TDFA/PCREnessregex test RegexType for TDFA/PCREnessregex>construct a macro table suitable for use with the RE compilersregex9test that a MacroEnv is passing all of its built-in testsregex)format a macros table as a markdown tableregex(generate a plain text summary of a macroregex0list the source REs for each macro in plain textregex/list the source of a single macro in plain text)z{|}~None2EXƛregexza convenience function used by the API modules to insert capture names extracted from the parsed RE into the (*=~) resultregexza convenience function used by the API modules to insert capture names extracted from the parsed RE into the (?=~) resultregexYa hairy dynamically-typed function used with the legacy (=~) and (=~~) to see if it can/should add the capture names extracted from the RE into the polymorphic result of the operator (it does for any Match or Matches type, provided it is parameterised over a recognised type). The test suite is all over this one, testing all of these cases.NoneR!"#$%&'()*+,-./012345<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY[Z\f]^_`abcdeghijklmnopqrstuvwyRpqrstuvwklmnghijoPQRSTUVW<=>?@ABCDEFGHIJKLMNO!"#$%&'()12304-./*+,5\f]^_`abcdeXY[ZyNoneɬ6z{|}~None"#MN regex+an enumeration of all of the prelude macrosregex6generate the standard prelude Macros used to parse REsregex6format the standard prelude macros in a markdown tableregex0generate a textual summary of the prelude macrosregexZgenerate a plain text table giving the RE for each macro with all macros expanded (to NF)regex<generate plain text giving theexpanded RE for a single macroregex generate the  for the standard prelude macrosregex generate the } for a given regexnaming the macrosregex)all prelude macros are prefixed with thisregexa digit string macroregexsee  'https://mathiasbynens.be/demo/url-regex (based on @stephenhay URL)-z{|}~None9NoneO8<z{|}~}~z{|< Safeܼregex/contains a compiled RE and replacement templateregex#the RE to match a string to replaceregexkthe replacement template with ${cap} used to identify a capture (by number or name if one was given) and $$ being used to escape a single !None"#@A regexthe m class allows polymorhic tools to be written that will work with a variety of regex back ends and text typesregexfinding the first matchregexfinding all matchesregex5compiling an RE, failing if the RE is not well formedregexcomiling an RE, specifying the  regex compiling a U template from the RE text and the template Text, failing if they are not well formedregex compiling a  template specifing the   for the REregexIincorporate an escaped string into a compiled RE with the default optionsregexDincorporate an escaped string into a compiled RE with the specified  regex&extract the text of the RE from the REregexsearch and replace all matches in the argument text; e.g., this function will convert every YYYY-MM-DD format date in its argument text into a DD/MM/YYYY date: XsearchReplaceAll [ed|${y}([0-9]{4})-0*${m}([0-9]{2})-0*${d}([0-9]{2})///${d}/${m}/${y}|]regexsearch and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the imput text, if any, with 0x: .searchReplaceFirst [ed|[0-9A-Fa-f]{4}///0x$0|]"NoneregexCa simple regex-based scanner interpretter for prototyping scannersregexa higher order version of  parameterised over the  matchOnce function#None"#7regex-options for the general Token formatter belowregex!Posix, PCRE or indeterminate REs?regexremove captures where possibleregex"include the captures in the outputregex-our RE scanner returns a list of these tokensregexquasi quoter for CaptureID: [cp|0|], [cp|0|]>, etc., indexing captures by classic positional numbers, and  [cp|foo|]%, etc., referencing a named capture [re| ... ${foo}( ... ) ... |].regexextract the CaptureNames from an RE or return an error diagnostic if the RE is not well formed; also returs the total number of captures in the REregex!check that a token is well formedregexBanalyse a token stream, returning the number of captures and the 0regex(scan a RE string into a list of RE Tokenregex format [Token] into an RE stringregex1the default configuration for the Token formatterregexOa configuration that will preserve the parsed regular expression in the outputregexDthe general Token formatter, generating REs according to the optionsNoneNoned!"#$%&'()*+,-./012345<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY[Z\f]^_`abcdeghijklmnopqrstuvwyNone"#> regexa GrepScript lists RE-action associations, with the first RE to match a line selecting the action to be executed on each line in the fileregex returns a 0 for each line in the file, listing all of the P for that lineregexthe 6 for this lineregexall the P of the RE on this lineregex7specifies whether to return the linss matched or missedregexoperates a bit like classic grep printing out the lines matchedregex returns a I for each line in the file, enumerating all of the matches for that lineregex returns a R for each line in the argument text, enumerating all of the matches for that lineregex!given a list of lines, apply the  to each line of the fileregex&generate a grep report from a list of regexgiven a velocity9 flag filter out either the lines matched or not matchedv!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY[Z\f]^_`abcdeghijklmnopqrstuvwy$6789:; None"# regexas we don't want the  directoryZ and FilePath dependencies we will abstract the three calls we need into this record typeregex)doesDirectoryExist from System.DirectoryregexDeither getDirectoryContents or listDirectory from System.Directoryregex / from System.FilePathregexrecursively list all files whose filename matches given RE, sorting the list into ascending order; if the argument path has a trailing  then it will be removedregexzrecursively list all files whose filename matches given RE, using the given function to determine which matches to acceptregex"the directory and filepath methodsregexresult post-processing functionregexfiltering functionregex*re to be matched against the leaf filenameregexroot directory of the searchi!"#$%&'()*+,-./012345<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY[Z\f]^_`abcdeghijklmnopqrstuvwy None"#49Oregexoa LineEdit is the most general action thar can be performed on a line and is the only means of deleting a line regex%do not edit this line but leave as is regexLreplace the line with this text (terminating newline should not be included) regexdelete the this line altogether regex<each Edit action specifies how the match should be processed regexPreplace the match with this template text, substituting ${capture} as apropriateregex!use this function to replace the k( specified captures in each line matchedregex+use this function to edit each line matchedregexan  script will, for each line in the file, either perform the action selected by the first RE in the list, or perform all of the actions on line, arranged as a pipelineregexfor each line select the first Edit- to match each line and edit the line with itregex?for each line apply every edit that matches in turn to the lineregex apply an   script to a single lineregexapply a single edit action to a line, the function in the first argument being used to add a new line onto the end of the line where appropriate; the function returns Nothing- if no edit is to be performed on the line,  Just mempty to delete the lineregexapply a   to a line, using the function in the first argument to append a new line to the result; Nothing should be returned if no edit is to be performed,  Just mempty to delete the linev!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY[Z\f]^_`abcdeghijklmnopqrstuvwy     $     6789:; None"#>?oregexread a file, apply an } script to each line it and write the file out again; "-" is used to indicate standard input standard output as appropriateregex apply an ) script to each line of the argument textx!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY[Z\f]^_`abcdeghijklmnopqrstuvwy     &     6789:;$NoneB!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY[Z\f]^_`abcdeghijklmnopqrstuvwy     =     6789:;%NoneE !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY[Z\f]^_`abcdeghijklmnopqrstuvwyz{|}~     &None"#NGregex warapper on A that will generate an error if any compilation errors are foundregexcompile a SearchReplace template generating errors if the RE or the template are not well formed -- all capture references being checkedregexcompile  SearcgReplaceA from two strings containing the RE and the replacement templateNoneN6 x6x 'None "#=>?@A&regex)and the REOptions for this back end (see Text.RE.REOptions for details)regex(a number of types can be used to encode /, each of which is made a member of this classregex convert the o type into an  REOptions regexFthe RE type for this back end representing a well-formed, compiled RE!regexsome functions in the Text.RE.TestBench2 need the back end to be passed dynamically as a  parameters: use ! for this"regex extract the  from the RE#regex&extract the RE source string from the RE$regex extract the 0 from the RE%regexextract the back end compiled  type from the RE&regex the default 'regex the default  but with no RE macros defined(regexconvert a universal SimpleReOptions into the  used by this back end)regex compile a  into a  L with the default options, generating an error if the RE is not well formed*regex compile a  into a   using the given SimpleREOptions3, generating an error if the RE is not well formed+regex compile a  into a   using the given SimpleREOptions3, generating an error if the RE is not well formed,regexcompile a SearchReplace template generating errors if the RE or the template are not well formed, all capture references being checked-regexcompile a SearchReplace template, with simple options, generating errors if the RE or the template are not well formed, all capture references being checked.regexcompile a SearchReplace template, with general options, generating errors if the RE or the template are not well formed, all capture references being checked/regexconvert a string into a RE that matches that string, and apply it to an argument continuation function to make up the RE string to be compiled; e.g., to compile a RE that will only match the string: /maybe undefined id . escape (("^"++) . (++"$"))0regex a variant of / where the   are specified1regex a variant of 0 that allows an  RE option to be specified2regexthe standard table of = used to compile REs (which can be extended or replace: see Text.RE.TestBench)3regex the standard  for this back end (see Text.RE.TestBench)4regexlthe macros in the standard environment that are failing their tests (checked by the test suite to be empty)5regex.a table the standard macros in markdown format6regexTa summary of the macros in the standard environment for this back end in plain text7regexla listing of the RE text for each macro in the standard environment with all macros expanded to normal form8regex?the prolude source of a given macro in the standard environment9regex [re| ... |], is equivalent to [reMultilineSensitive| ... |],, compiling a case-sensitive, multi-line RE:regex[reMultilineSensitive| ... |]*, compiles a case-sensitive, multi-line RE;regex[reMultilineInsensitive| ... |],, compiles a case-insensitive, multi-line RE<regex[reMultilineInsensitive| ... |]., compiles a case-sensitive, non-multi-line RE=regex[reMultilineInsensitive| ... |]0, compiles a case-insensitive, non-multi-line RE>regex [reMS| ... |] is a shorthand for [reMultilineSensitive| ... |]?regex [reMI| ... |] is a shorthand for [reMultilineInsensitive| ... |]@regex [reBS| ... |] is a shorthand for [reBlockSensitive| ... |]Aregex [reBI| ... |] is a shorthand for eBlockInsensitive| ... |]Bregex [re_| ... |]I compiles a RE to produce a function that takes the RE options (e.g., a  D value) and yields the RE compiled with those options. For example, :countMatches $ s *=~ [re_|[0-9a-f]+|] MultilineInsensitive2counts the number of hexadecimal digit strings in sn, allowing for upper- or lower-case hex didgits (which is entirely equivalent in this example to just using #[reMultilineInsensitive|[0-9a-f]+|]).( !"#$%&'()*+,-./0123456789:;<=>?@AB(None>zregex5construct a quasi quoter from a casting function and Just sroA if the options are known, otherwise a function take takes the   and constructs the  template)Noneo Cregex[ed| ... /// ... |], is equivalent to %[edMultilineSensitive| ... /// ... |]*, compiling a case-sensitive, multi-line Dregex%[edMultilineSensitive| ... /// ... |]' compiles a case-sensitive, multi-line  templateEregex'[edMultilineInsensitive| ... /// ... |]) compiles a case-insensitive, multi-line  templateFregex![edBlockSensitive| ... /// ... |]+ compiles a case-sensitive, non-multi-line  templateGregex#[edBlockInsensitive| ... /// ... |]- compiles a case-insensitive, non-multi-line  templateHregex[edMS| ... /// ... |] is a shorthand for %[edMultilineSensitive| ... /// ... |]Iregex[edMI| ... /// ... |] is a shorthand for '[edMultilineInsensitive| ... /// ... |]Jregex[edBS| ... /// ... |] is a shorthand for ![edBlockSensitive| ... /// ... |]Kregex[edBI| ... /// ... |] is a shorthand for #[edBlockInsensitive| ... /// ... |]Lregex[ed_| ... /// ... |] compiles a D template to produce a function that takes the RE options (e.g., a   value) and yields the 3 template compiled with those options. For example, ?s *=~/ [ed_|${hex}([0-9a-f]+)///0x${hex}|] MultilineInsensitive1prefixes the hexadecimal digit strings in s with 0xn, allowing for upper- or lower-case hex didgits (which is entirely equivalent in this example to just using #[edMultilineInsensitive|[0-9a-f]+|]). CDEFGHIJKL*None Mregex[ed| ... /// ... |], is equivalent to %[edMultilineSensitive| ... /// ... |]*, compiling a case-sensitive, multi-line Nregex%[edMultilineSensitive| ... /// ... |]' compiles a case-sensitive, multi-line  templateOregex'[edMultilineInsensitive| ... /// ... |]) compiles a case-insensitive, multi-line  templatePregex![edBlockSensitive| ... /// ... |]+ compiles a case-sensitive, non-multi-line  templateQregex#[edBlockInsensitive| ... /// ... |]- compiles a case-insensitive, non-multi-line  templateRregex[edMS| ... /// ... |] is a shorthand for %[edMultilineSensitive| ... /// ... |]Sregex[edMI| ... /// ... |] is a shorthand for '[edMultilineInsensitive| ... /// ... |]Tregex[edBS| ... /// ... |] is a shorthand for ![edBlockSensitive| ... /// ... |]Uregex[edBI| ... /// ... |] is a shorthand for #[edBlockInsensitive| ... /// ... |]Vregex[ed_| ... /// ... |] compiles a D template to produce a function that takes the RE options (e.g., a   value) and yields the 3 template compiled with those options. For example, ?s *=~/ [ed_|${hex}([0-9a-f]+)///0x${hex}|] MultilineInsensitive1prefixes the hexadecimal digit strings in s with 0xn, allowing for upper- or lower-case hex didgits (which is entirely equivalent in this example to just using #[edMultilineInsensitive|[0-9a-f]+|]). MNOPQRSTUV+None͡ Wregex[ed| ... /// ... |], is equivalent to %[edMultilineSensitive| ... /// ... |]*, compiling a case-sensitive, multi-line Xregex%[edMultilineSensitive| ... /// ... |]' compiles a case-sensitive, multi-line  templateYregex'[edMultilineInsensitive| ... /// ... |]) compiles a case-insensitive, multi-line  templateZregex![edBlockSensitive| ... /// ... |]+ compiles a case-sensitive, non-multi-line  template[regex#[edBlockInsensitive| ... /// ... |]- compiles a case-insensitive, non-multi-line  template\regex[edMS| ... /// ... |] is a shorthand for %[edMultilineSensitive| ... /// ... |]]regex[edMI| ... /// ... |] is a shorthand for '[edMultilineInsensitive| ... /// ... |]^regex[edBS| ... /// ... |] is a shorthand for ![edBlockSensitive| ... /// ... |]_regex[edBI| ... /// ... |] is a shorthand for #[edBlockInsensitive| ... /// ... |]`regex[ed_| ... /// ... |] compiles a D template to produce a function that takes the RE options (e.g., a   value) and yields the 3 template compiled with those options. For example, ?s *=~/ [ed_|${hex}([0-9a-f]+)///0x${hex}|] MultilineInsensitive1prefixes the hexadecimal digit strings in s with 0xn, allowing for upper- or lower-case hex didgits (which is entirely equivalent in this example to just using #[edMultilineInsensitive|[0-9a-f]+|]). WXYZ[\]^_`,None aregex[ed| ... /// ... |], is equivalent to %[edMultilineSensitive| ... /// ... |]*, compiling a case-sensitive, multi-line bregex%[edMultilineSensitive| ... /// ... |]' compiles a case-sensitive, multi-line  templatecregex'[edMultilineInsensitive| ... /// ... |]) compiles a case-insensitive, multi-line  templatedregex![edBlockSensitive| ... /// ... |]+ compiles a case-sensitive, non-multi-line  templateeregex#[edBlockInsensitive| ... /// ... |]- compiles a case-insensitive, non-multi-line  templatefregex[edMS| ... /// ... |] is a shorthand for %[edMultilineSensitive| ... /// ... |]gregex[edMI| ... /// ... |] is a shorthand for '[edMultilineInsensitive| ... /// ... |]hregex[edBS| ... /// ... |] is a shorthand for ![edBlockSensitive| ... /// ... |]iregex[edBI| ... /// ... |] is a shorthand for #[edBlockInsensitive| ... /// ... |]jregex[ed_| ... /// ... |] compiles a D template to produce a function that takes the RE options (e.g., a   value) and yields the 3 template compiled with those options. For example, ?s *=~/ [ed_|${hex}([0-9a-f]+)///0x${hex}|] MultilineInsensitive1prefixes the hexadecimal digit strings in s with 0xn, allowing for upper- or lower-case hex didgits (which is entirely equivalent in this example to just using #[edMultilineInsensitive|[0-9a-f]+|]). abcdefghij-None kregex[ed| ... /// ... |], is equivalent to %[edMultilineSensitive| ... /// ... |]*, compiling a case-sensitive, multi-line lregex%[edMultilineSensitive| ... /// ... |]' compiles a case-sensitive, multi-line  templatemregex'[edMultilineInsensitive| ... /// ... |]) compiles a case-insensitive, multi-line  templatenregex![edBlockSensitive| ... /// ... |]+ compiles a case-sensitive, non-multi-line  templateoregex#[edBlockInsensitive| ... /// ... |]- compiles a case-insensitive, non-multi-line  templatepregex[edMS| ... /// ... |] is a shorthand for %[edMultilineSensitive| ... /// ... |]qregex[edMI| ... /// ... |] is a shorthand for '[edMultilineInsensitive| ... /// ... |]rregex[edBS| ... /// ... |] is a shorthand for ![edBlockSensitive| ... /// ... |]sregex[edBI| ... /// ... |] is a shorthand for #[edBlockInsensitive| ... /// ... |]tregex[ed_| ... /// ... |] compiles a D template to produce a function that takes the RE options (e.g., a   value) and yields the 3 template compiled with those options. For example, ?s *=~/ [ed_|${hex}([0-9a-f]+)///0x${hex}|] MultilineInsensitive1prefixes the hexadecimal digit strings in s with 0xn, allowing for upper- or lower-case hex didgits (which is entirely equivalent in this example to just using #[edMultilineInsensitive|[0-9a-f]+|]). klmnopqrst.None uregex[ed| ... /// ... |], is equivalent to %[edMultilineSensitive| ... /// ... |]*, compiling a case-sensitive, multi-line vregex%[edMultilineSensitive| ... /// ... |]' compiles a case-sensitive, multi-line  templatewregex'[edMultilineInsensitive| ... /// ... |]) compiles a case-insensitive, multi-line  templatexregex![edBlockSensitive| ... /// ... |]+ compiles a case-sensitive, non-multi-line  templateyregex#[edBlockInsensitive| ... /// ... |]- compiles a case-insensitive, non-multi-line  templatezregex[edMS| ... /// ... |] is a shorthand for %[edMultilineSensitive| ... /// ... |]{regex[edMI| ... /// ... |] is a shorthand for '[edMultilineInsensitive| ... /// ... |]|regex[edBS| ... /// ... |] is a shorthand for ![edBlockSensitive| ... /// ... |]}regex[edBI| ... /// ... |] is a shorthand for #[edBlockInsensitive| ... /// ... |]~regex[ed_| ... /// ... |] compiles a D template to produce a function that takes the RE options (e.g., a   value) and yields the 3 template compiled with those options. For example, ?s *=~/ [ed_|${hex}([0-9a-f]+)///0x${hex}|] MultilineInsensitive1prefixes the hexadecimal digit strings in s with 0xn, allowing for upper- or lower-case hex didgits (which is entirely equivalent in this example to just using #[edMultilineInsensitive|[0-9a-f]+|]). uvwxyz{|}~/None regexthe [ed| ... /// ... |] quasi quotersregexthe [ed| ... /// ... |] quasi quotersregexthe [ed| ... /// ... |] quasi quotersregexthe [ed| ... /// ... |] quasi quotersregexthe [ed| ... /// ... |] quasi quotersregexthe [ed| ... /// ... |] quasi quotersregexthe [ed| ... /// ... |] quasi quotersregexthe [ed| ... /// ... |] quasi quotersregexthe [ed| ... /// ... |] quasi quotersregexthe [ed| ... /// ... |] quasi quoters  None=>?@A"/regexWfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexifind the first match in the argument text; e.g., to test if there is a natural number in the input text: matched $ s ?=~ [re|[0-9]+|]regexsearch and replace all matches in the argument text; e.g., this section will convert every YYYY-MM-DD format date in its argument text into a DD/MM/YYYY date: N(*=~/ [ed|${y}([0-9]{4})-0*${m}([0-9]{2})-0*${d}([0-9]{2})///${d}/${m}/${y}|])regexsearch and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the input text, if any, with 0x: "(?=~/ [ed|[0-9A-Fa-f]{4}///0x$0|])regexthe  `regex-base` polymorphic match operatorregexthe  `regex-base`$ monadic, polymorphic match operator^ <>CDPSRTUV #)*,-/09:;<=>?@ABCDEFGHIJKL7PRSTUV<>CD # )*,-/09:;<=>?@ABDEFGCHIJKLNone=>?@A1regexWfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexifind the first match in the argument text; e.g., to test if there is a natural number in the input text: matched $ s ?=~ [re|[0-9]+|]regexsearch and replace all matches in the argument text; e.g., this section will convert every YYYY-MM-DD format date in its argument text into a DD/MM/YYYY date: N(*=~/ [ed|${y}([0-9]{4})-0*${m}([0-9]{2})-0*${d}([0-9]{2})///${d}/${m}/${y}|])regexsearch and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the input text, if any, with 0x: "(?=~/ [ed|[0-9A-Fa-f]{4}///0x$0|])regexthe  `regex-base` polymorphic match operatorregexthe  `regex-base`$ monadic, polymorphic match operator^ <>CDPSRTUV #)*,-/09:;<=>?@ABMNOPQRSTUV7PRSTUV<>CD # )*,-/09:;<=>?@ABNOPQMRSTUVNone=>?@AAregexWfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexifind the first match in the argument text; e.g., to test if there is a natural number in the input text: matched $ s ?=~ [re|[0-9]+|]regexsearch and replace all matches in the argument text; e.g., this section will convert every YYYY-MM-DD format date in its argument text into a DD/MM/YYYY date: N(*=~/ [ed|${y}([0-9]{4})-0*${m}([0-9]{2})-0*${d}([0-9]{2})///${d}/${m}/${y}|])regexsearch and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the input text, if any, with 0x: "(?=~/ [ed|[0-9A-Fa-f]{4}///0x$0|])regexthe  `regex-base` polymorphic match operatorregexthe  `regex-base`$ monadic, polymorphic match operator^ <>CDPSRTUV #)*,-/09:;<=>?@ABWXYZ[\]^_`7PRSTUV<>CD # )*,-/09:;<=>?@ABXYZ[W\]^_`None=>?@AQ~regexWfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexifind the first match in the argument text; e.g., to test if there is a natural number in the input text: matched $ s ?=~ [re|[0-9]+|]regexsearch and replace all matches in the argument text; e.g., this section will convert every YYYY-MM-DD format date in its argument text into a DD/MM/YYYY date: N(*=~/ [ed|${y}([0-9]{4})-0*${m}([0-9]{2})-0*${d}([0-9]{2})///${d}/${m}/${y}|])regexsearch and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the input text, if any, with 0x: "(?=~/ [ed|[0-9A-Fa-f]{4}///0x$0|])regexthe  `regex-base` polymorphic match operatorregexthe  `regex-base`$ monadic, polymorphic match operator^ <>CDPSRTUV #)*,-/09:;<=>?@ABabcdefghij7PRSTUV<>CD # )*,-/09:;<=>?@ABbcdeafghijNone=>?@AaCregexWfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexifind the first match in the argument text; e.g., to test if there is a natural number in the input text: matched $ s ?=~ [re|[0-9]+|]regexsearch and replace all matches in the argument text; e.g., this section will convert every YYYY-MM-DD format date in its argument text into a DD/MM/YYYY date: N(*=~/ [ed|${y}([0-9]{4})-0*${m}([0-9]{2})-0*${d}([0-9]{2})///${d}/${m}/${y}|])regexsearch and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the input text, if any, with 0x: "(?=~/ [ed|[0-9A-Fa-f]{4}///0x$0|])regexthe  `regex-base` polymorphic match operatorregexthe  `regex-base`$ monadic, polymorphic match operator^ <>CDPSRTUV #)*,-/09:;<=>?@ABklmnopqrst7PRSTUV<>CD # )*,-/09:;<=>?@ABlmnokpqrstNone=>?@AqregexWfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexifind the first match in the argument text; e.g., to test if there is a natural number in the input text: matched $ s ?=~ [re|[0-9]+|]regexsearch and replace all matches in the argument text; e.g., this section will convert every YYYY-MM-DD format date in its argument text into a DD/MM/YYYY date: N(*=~/ [ed|${y}([0-9]{4})-0*${m}([0-9]{2})-0*${d}([0-9]{2})///${d}/${m}/${y}|])regexsearch and replace the first occurrence only (if any) in the input text e.g., to prefix the first string of four hex digits in the input text, if any, with 0x: "(?=~/ [ed|[0-9A-Fa-f]{4}///0x$0|])regexthe  `regex-base` polymorphic match operatorregexthe  `regex-base`$ monadic, polymorphic match operator^ <>CDPSRTUV #)*,-/09:;<=>?@ABuvwxyz{|}~7PRSTUV<>CD # )*,-/09:;<=>?@ABvwxyuz{|}~ None>~*regexWfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexifind the first match in the argument text; e.g., to test if there is a natural number in the input text: matched $ s ?=~ [re|[0-9]+|]regexsearch and replace all matches in the argument text; e.g., this section will convert every YYYY-MM-DD format date in its argument text into a DD/MM/YYYY date: N(*=~/ [ed|${y}([0-9]{4})-0*${m}([0-9]{2})-0*${d}([0-9]{2})///${d}/${m}/${y}|])regex,search and replace the first occurrence onlyregex)the regex-base polymorphic match operatorregex2the regex-base monadic, polymorphic match operatorr <>CDPSRTUV !"#$%&'()*+,-./0123456789:;<=>?@ABKPRSTUV<>CD !"#$% &'()*+,-./019:;<=>?@AB234567800123456789:;<=>?@ABCDEFGHIJKKLMNOOPQRSTUVWWXYYZ[\]^_`abcdefgghijklmnopqrstuvwxyzz{|}~   !!!!!!!!!!!!"" # # # # ##### !"# $ $ % & ' ( ) * + , - . / 0 * 1 2 3 4 5 6 7 8 9 :&;&<&='4'>'?'@'A'B'C'D'E'F'G'H'I'J'K'L'M'N'O'P'Q'R'S'T'U'V'W'X'Y'Z'['\']'^'_'`'a'b)c)d)e)f)g)h)i)j)k)l*c*d*e*f*g*h*i*j*k*l+c+d+e+f+g+h+i+j+k+l,c,d,e,f,g,h,i,j,k,l-c-d-e-f-g-h-i-j-k-l.c.d.e.f.g.h.i.j.k.l/c/h/i/j/k/d/e/f/g/l m n o p q r smnopqrsmnopqrtmnopqrumnopqrvmnopqrv m n o p q rwxyz{|}~x############xx($regex-1.0.1.4-C6r8CMlust93QgaT2grYQBText.RE.REOptionsText.RE.ZeInternalsText.RE.ReplaceText.RE.Tools.GrepText.RE.TestBenchText.RE.TestBench.ParsersText.RE.Tools.IsRegexText.RE.Tools.LexText.RE.Tools.FindText.RE.Tools.EditText.RE.Tools.Sed Text.RE.TDFAText.RE.TDFA.Text.LazyText.RE.TDFA.TextText.RE.TDFA.StringText.RE.TDFA.SequenceText.RE.TDFA.ByteString.LazyText.RE.TDFA.ByteStringText.RE"Text.RE.ZeInternals.EscapeREStringText.RE.ZeInternals.QQ!Text.RE.ZeInternals.Types.Capture#Text.RE.ZeInternals.Types.CaptureID Text.RE.ZeInternals.Types.LineNoText.RE.ZeInternals.Types.Match!Text.RE.ZeInternals.Types.MatchesText.RE.ZeInternals.ReplaceText.RE.ZeInternals.TestBench#Text.RE.ZeInternals.AddCaptureNames%Text.RE.ZeInternals.TestBench.Parsers!Text.RE.ZeInternals.PreludeMacros'Text.RE.ZeInternals.Types.SearchReplace!Text.RE.ZeInternals.Types.IsRegexText.RE.ZeInternals.Tools.Lex!Text.RE.ZeInternals.NamedCaptures Text.RE.Tools Text.RE.Summa!Text.RE.ZeInternals.SearchReplaceText.RE.ZeInternals.TDFA-Text.RE.ZeInternals.SearchReplace.TDFAEdPrime0Text.RE.ZeInternals.SearchReplace.TDFA.Text.Lazy+Text.RE.ZeInternals.SearchReplace.TDFA.Text-Text.RE.ZeInternals.SearchReplace.TDFA.String/Text.RE.ZeInternals.SearchReplace.TDFA.Sequence6Text.RE.ZeInternals.SearchReplace.TDFA.ByteString.Lazy1Text.RE.ZeInternals.SearchReplace.TDFA.ByteString&Text.RE.ZeInternals.SearchReplace.TDFAMacroID getMacroIDMacros REOptions_ REOptions optionsMacs optionsComp optionsExecSimpleREOptionsMultilineSensitiveMultilineInsensitiveBlockSensitiveBlockInsensitive emptyMacros$fLiftSimpleREOptions$fHashableMacroID$fBoundedSimpleREOptions$fEnumSimpleREOptions$fEqSimpleREOptions$fOrdSimpleREOptions$fShowSimpleREOptions$fIsStringMacroID $fOrdMacroID $fEqMacroID $fShowMacroID$fShowREOptions_escapeREString QQFailure _qqf_context_qqf_componentqq0Capture captureSource capturedText captureOffset captureLength hasCaptured capturePrefix captureSuffixCaptureOrdinalgetCaptureOrdinal CaptureNamegetCaptureName CaptureNames CaptureIDIsCaptureOrdinal IsCaptureNamenoCaptureNames findCaptureIDLineNoZeroBasedLineNogetZeroBasedLineNo firstLine getLineNolineNoMatch matchSource captureNames matchArraynoMatchemptyMatchArraymatched matchedText matchCapture matchCaptures!$$ captureText!$$?captureTextMaybe!$capture!$? captureMaybeconvertMatchTextMatches matchesSource allMatches anyMatches countMatchesmatches mainCapturesReplaceMethods methodLength methodSubstReplacelengthRpackRunpackRtextifyR detextifyRlinesRunlinesRappendNewlineRsubstRparseTemplateR RELocation locationMatchlocationCapture REContextTOPSUBALL isTopLocation replaceAllreplaceAllCapturesreplaceAllCaptures_replaceAllCapturesMreplacereplaceCapturesreplaceCaptures_replaceCapturesM expandMacrosreplaceMethods RegexSource _RegexSourceMacroDescriptor macroSource macroSamplesmacroCounterSamplesmacroTestResults macroParsermacroDescriptionMacroEnv WithCaptures InclCaptures ExclCaptures RegexTypeisTDFAisPCREmkTDFAmkPCREpresentRegexTypemkMacros testMacroEnv badMacrosrunTests runTests'formatMacroTableformatMacroSummaryformatMacroSourcesformatMacroSource mdRegexSourceaddCaptureNamesToMatchesaddCaptureNamesToMatchaddCaptureNamesSeverityEmergAlertCritErrWarningNoticeInfoDebug IPV4Address parseIntegerparseHex parseDouble parseStringparseSimpleString parseDateparseSlashesDateparseTimeOfDay parseTimeZone parseDateTimeparseDateTime8601parseDateTimeCLFparseShortMonthshortMonthArrayparseIPv4Address parseSeverityseverityKeywords PreludeMacroPM_natPM_hexPM_intPM_frac PM_stringPM_string_simplePM_idPM_id'PM_id_PM_datePM_date_slashesPM_time PM_timezone PM_datetimePM_datetime_8601PM_datetime_clf PM_shortmonthPM_address_ipv4PM_email_simplePM_urlPM_syslog_severity preludeMacrospreludeMacroTablepreludeMacroSummarypreludeMacroSourcespreludeMacroSourcepreludeMacroEnvpresentPreludeMacro SearchReplace getSearch getTemplateIsRegex matchOnce matchMany makeRegex makeRegexWithmakeSearchReplacemakeSearchReplaceWith makeEscapedmakeEscapedWith regexSourcesearchReplaceAllsearchReplaceFirstalexalex'TokencpextractNamedCaptures validTokenscan formatTokensidFormatTokenREOptions formatTokens' formatTokens0 GrepScriptLine getLineNumbergetLineMatches Verbosity LinesMatchedLinesNotMatchedgrep grepLines grepFiltergrepWithScriptreport linesMatched$fShowVerbosity $fEqVerbosity$fOrdVerbosity $fShowLine FindMethodsdoesDirectoryExistDMlistDirectoryDM combineDM findMatches_ findMatches_'LineEditNoEdit ReplaceWithDeleteEditTemplateFunctionEditsSelectPipe applyEdits applyEdit applyLineEdit$fFunctorLineEdit$fShowLineEditsedsed'unsafeCompileSearchReplace_compileSearchReplace_compileSearchAndReplace_IsOption makeREOptionsRE regexType reOptionsreSourcereCaptureNamesreRegexdefaultREOptionsnoPreludeREOptionsunpackSimpleREOptions compileRegexcompileRegexWithcompileRegexWithOptionscompileSearchReplacecompileSearchReplaceWithcompileSearchReplaceWithOptionsescape escapeWithescapeWithOptionsprelude preludeEnvpreludeTestsFailing preludeTablepreludeSummarypreludeSources preludeSourcerereMultilineSensitivereMultilineInsensitivereBlockSensitivereBlockInsensitivereMSreMIreBSreBIre_ededMultilineSensitiveedMultilineInsensitiveedBlockSensitiveedBlockInsensitiveedMSedMIedBSedBIed_*=~?=~*=~/?=~/=~=~~$fIsRegexREText $fIsRegexRE[]$fIsRegexRESeq$fIsRegexREByteString isMetaCharbaseGHC.Num*$fRegexContextregexsourceMatchRegexFix utf8_correct $fRegexContextregexsourceMatches expandMacros'templateCapturesparse_template_capture scan_templateparseTemplateR'REToken _ret_prefix _ret_fixed _ret_grouping_ret_capturing FunctionID TestResult _FunctionID _TestResulttestMacroDescriptorspreludeMacroDescriptorprelude_prefix decimal_macro url_macroGHC.Base$FormatTokenREOptions_fto_regex_type _fto_min_caps_fto_incl_caps analyseTokensdefFormatTokenREOptionsOtherECapPGrpPCapBraBSGHC.Real/)regex-tdfa-1.2.3.1-23cBa9wOlg41Be1KcvS1xEText.Regex.TDFA.CommonRegexStringed'