h$      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                               0(C) 2016-17 Chris DornanBSD3 (see the LICENSE file)+Chris Dornan RFCportable Safe-InferredNone2;7regexMacroID 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)regexthe 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  ExecOption 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 appropriate 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 regexthe default API uses these simple, universal RE options, which get auto-converted into the appropriate back-end  regexcase-sensitive with ^ and $ matching the start and end of a line regex?case-insensitive with ^ and $ matsh the start and end of a line regexcase-sensitive with ^ and $ matching the start and end of the input text regexcase-insensitive with ^ and $ matching the start and end of the input textregex#a macro table containing no entriesregexMacroID is used with  HM.HashMap to build macro lookup tablesregex4we need to use this in the quasi quoters to specify SimpleREOptions selected by the quasi quoter   Safe-Inferred.regexConvert a string into a regular expression that will match that stringregex>returns True iff the character is an RE meta character ('[',  , '{', etc.) Safe-Inferred3regex?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 regexa quasi quoter that can be used in no context (to be extended with the appropriate quasi quoter parser)  Safe-Inferred#$3>!regexthe matching of a single sub-expression against part of the source text#regex the whole text that was searched$regexthe text that was matched%regexthe 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 !"#$%&'()None*regexa * 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 name0regexthe dictionary for named captures stored in compiled regular expressions associates1regexCaptureID 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 *+,-./013245None6regex2our 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 #$3>?<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 matchEregexthe top-level capture if the source text matched the RE, Nothing otherwiseFregexthe 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 < into regex-base: regex consumers need not worry about any of this<=>?@ABCDEFGHIJKLMNOG9 K9 None #$3>? KPregex1the 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 P into regex-base: regex consumers need not worry about any of thisPQRSTUVWNone #$>?+Xregexa selection of the Replace methods can be encapsulated with ReplaceMethods for the higher-order replacement functions\regexReplace 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 Capturefregexconvert a template containing $0, $1, etc., in the first argument, into a phi replacement function for use with replaceAllCaptures and replaceCapturesgregexthe  RELocation information passed into the substitution function specifies which sub-expression is being substitutediregexthe 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 appliedlregexsubstitutions should be applied to the top-level only, the text that matched the whole REmregexsubstitutions should only be applied to the text captured by bracketed sub-REsnregexthe substitution function should be applied to all captures, the top level and the sub-expression capturesoregexTrue iff the location references a complete match (i.e., not a bracketed capture)pregexreplace 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.rregexreplaceAllCaptures_ is like like replaceAllCaptures but takes the Replace methods through the ReplaceMethods argumentsregexreplaceAllCapturesM 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.vregexreplaceCaptures_ is like replaceCaptures but takes the Replace methods through the ReplaceMethods argumentwregexreplaceCapturesM 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)regexexpand the @{..} macros in the argument string using the given functionregexlist all of the CaptureID references in the replace template in the second argumentyregexreplaceMethods encapsulates ReplaceMethods a from a Replace a context$XY[Z\f]^_`abcdeghijklmnopqrstuvwxyNone #$2regexname 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}regexdescribes a macro, giving the text of the RE and a summary descriptionregexthe REregexsome sample matchesregexsome sample non-matchesregexvalidation test resultsregexWA, the parser functionregexsummary commentregexeach macro can reference others, the whole environment being required for each macro, so we use a Lazy HashMapregexdo we need the captures in the RE or would 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{|}~None 34regexa convenience function used by the API modules to insert capture names extracted from the parsed RE into the (*=~) resultregexa convenience function used by the API modules to insert capture names extracted from the parsed RE into the (?=~) resultregexa 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.None5 !"#$%&'()*+,-./012345<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY[Z\f]^_`abcdeghijklmnopqrstuvwypqrstuvwklmnghijoPQRSTUVW<=>?@ABCDEFGHIJKLMNO!"#$%&'()12304-./*+,5\f]^_`abcdeXY[ZyNone 56z{|}~ None #$8 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 macrosregexgenerate a plain text table giving the RE for each macro with all macros expanded (to NF)regex=generate plain text giving the expanded RE for a single macroregex generate the  for the standard prelude macrosregex generate the } for a given regexnaming the macros-z{|}~None9 None 98, 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 returns the total number of captures in the REregex!check that a token is well formedregex(scan a RE string into a list of RE Tokenregex format [Token] into an RE stringregexa configuration that will preserve the parsed regular expression in the outputregexthe general Token formatter, generating REs according to the optionsNoneD NoneEQ!"&%#$'()*+,-./012345<=@>?ABCDEFGHIJKLMNOPQRSTUVWXY[Z\edcba`_^f]ghijknlmopqrstuvwyNone#$?I 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 lines matched or missedregexoperates a bit like classic grep printing out the lines matchedregex returns a  for each line in the file, enumerating all of the matches for that lineregex returns a  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 matched!"&%#$'()*+,-./0123456789:;<=@>?ABCDEFGHIJKLMNOPQRSTUVWXY[Z\edcba`_^f]ghijknlmopqrstuvwy$6789:; None#$Nregexas we don't want the  directory and FilePath dependencies we will abstract the three calls we need into this record typeregex)doesDirectoryExist from System.Directoryregexeither 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 removedregexrecursively 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 search!"&%#$'()*+,-./012345<=@>?ABCDEFGHIJKLMNOPQRSTUVWXY[Z\edcba`_^f]ghijknlmopqrstuvwy None#$5Tregexa LineEdit is the most general action that can be performed on a line and is the only means of deleting a lineregex%do not edit this line but leave as isregexreplace the line with this text (terminating newline should not be included)regexdelete the this line altogetherregex?ABCDEFGHIJKLMNOPQRSTUVWXY[Z\edcba`_^f]ghijknlmopqrstuvwy$6789:; None#$?Vregexread 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 text!"&%#$'()*+,-./0123456789:;<=@>?ABCDEFGHIJKLMNOPQRSTUVWXY[Z\edcba`_^f]ghijknlmopqrstuvwy&6789:;%NoneW!"&%#$'()*+,-./0123456789:;<=@>?ABCDEFGHIJKLMNOPQRSTUVWXY[Z\edcba`_^f]ghijknlmopqrstuvwy=6789:;&NoneY !"&%#$'()*+,-./0123456789:;<=@>?ABCDEFGHIJKLMNOPQRSTUVWXY[Z\edcba`_^f]ghijknlmopqrstuvwyz{|}~'None#$[regex warapper on  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  SearcgReplace from two strings containing the RE and the replacement templateNone\6 x6x (None #$>?m'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  REOptionsregexthe RE type for this back end representing a well-formed, compiled REregexsome functions in the Text.RE.TestBench2 need the back end to be passed dynamically as a  parameters: use  for thisregex extract the  from the REregex&extract the RE source string from the REregex extract the 0 from the REregexextract the back end compiled  type from the REregex the default regex the default  but with no RE macros definedregexconvert a universal SimpleReOptions into the  used by this back endregex compile a  into a  with the default options, generating an error if the RE is not well formedregex compile a  into a  using the given SimpleREOptions3, generating an error if the RE is not well formedregex compile a  into a  using the given SimpleREOptions3, generating an error if the RE is not well formedregex compile a  into a & for q quasi quoter, using the given SimpleREOptions2, generating an error if the RE is not well formedregexcompile a SearchReplace template generating errors if the RE or the template are not well formed, all capture references being checkedregexcompile a SearchReplace template, with simple options, generating errors if the RE or the template are not well formed, all capture references being checkedregexcompile a SearchReplace template, with general options, generating errors if the RE or the template are not well formed, all capture references being checkedregexconvert 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 (("^"++) . (++"$"))regex a variant of  where the   are specifiedregex a variant of  that allows an  RE option to be specifiedregexthe standard table of = used to compile REs (which can be extended or replace: see Text.RE.TestBench)regex the standard  for this back end (see Text.RE.TestBench)regexthe macros in the standard environment that are failing their tests (checked by the test suite to be empty)regex.a table the standard macros in markdown formatregexa summary of the macros in the standard environment for this back end in plain textregexa listing of the RE text for each macro in the standard environment with all macros expanded to normal formregex?the prelude source of a given macro in the standard environmentregex [re| ... |], is equivalent to [reMultilineSensitive| ... |],, compiling a case-sensitive, multi-line REregex[reMultilineSensitive| ... |]*, compiles a case-sensitive, multi-line REregex[reMultilineInsensitive| ... |],, compiles a case-insensitive, multi-line REregex[reMultilineInsensitive| ... |]., compiles a case-sensitive, non-multi-line REregex[reMultilineInsensitive| ... |]0, compiles a case-insensitive, non-multi-line REregex [reMS| ... |] is a shorthand for [reMultilineSensitive| ... |]regex [reMI| ... |] is a shorthand for [reMultilineInsensitive| ... |]regex [reBS| ... |] is a shorthand for [reBlockSensitive| ... |]regex [reBI| ... |] is a shorthand for eBlockInsensitive| ... |]regex [re_| ... |] compiles a RE to produce a function that takes the RE options (e.g., a   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 s, allowing for upper- or lower-case hex digits (which is entirely equivalent in this example to just using #[reMultilineInsensitive|[0-9a-f]+|]).))None?oregex5construct a quasi quoter from a casting function and Just sro if the options are known, otherwise a function take takes the   and constructs the  template*Noneu regex[ed| ... /// ... |], is equivalent to %[edMultilineSensitive| ... /// ... |]*, compiling a case-sensitive, multi-line regex%[edMultilineSensitive| ... /// ... |]' compiles a case-sensitive, multi-line  templateregex'[edMultilineInsensitive| ... /// ... |]) compiles a case-insensitive, multi-line  templateregex![edBlockSensitive| ... /// ... |]+ compiles a case-sensitive, non-multi-line  templateregex#[edBlockInsensitive| ... /// ... |]- compiles a case-insensitive, non-multi-line  templateregex[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  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 0x, allowing for upper- or lower-case hex digits (which is entirely equivalent in this example to just using #[edMultilineInsensitive|[0-9a-f]+|]). +None{ regex[ed| ... /// ... |], is equivalent to %[edMultilineSensitive| ... /// ... |]*, compiling a case-sensitive, multi-line regex%[edMultilineSensitive| ... /// ... |]' compiles a case-sensitive, multi-line  templateregex'[edMultilineInsensitive| ... /// ... |]) compiles a case-insensitive, multi-line  templateregex![edBlockSensitive| ... /// ... |]+ compiles a case-sensitive, non-multi-line  templateregex#[edBlockInsensitive| ... /// ... |]- compiles a case-insensitive, non-multi-line  templateregex[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  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 0x, allowing for upper- or lower-case hex digits (which is entirely equivalent in this example to just using #[edMultilineInsensitive|[0-9a-f]+|]). ,None regex[ed| ... /// ... |], is equivalent to %[edMultilineSensitive| ... /// ... |]*, compiling a case-sensitive, multi-line regex%[edMultilineSensitive| ... /// ... |]' compiles a case-sensitive, multi-line  templateregex'[edMultilineInsensitive| ... /// ... |]) compiles a case-insensitive, multi-line  templateregex![edBlockSensitive| ... /// ... |]+ compiles a case-sensitive, non-multi-line  templateregex#[edBlockInsensitive| ... /// ... |]- compiles a case-insensitive, non-multi-line  templateregex[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  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 0x, allowing for upper- or lower-case hex digits (which is entirely equivalent in this example to just using #[edMultilineInsensitive|[0-9a-f]+|]). -None regex[ed| ... /// ... |], is equivalent to %[edMultilineSensitive| ... /// ... |]*, compiling a case-sensitive, multi-line regex%[edMultilineSensitive| ... /// ... |]' compiles a case-sensitive, multi-line  templateregex'[edMultilineInsensitive| ... /// ... |]) compiles a case-insensitive, multi-line  templateregex![edBlockSensitive| ... /// ... |]+ compiles a case-sensitive, non-multi-line  templateregex#[edBlockInsensitive| ... /// ... |]- compiles a case-insensitive, non-multi-line  templateregex[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  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 0x, allowing for upper- or lower-case hex digits (which is entirely equivalent in this example to just using #[edMultilineInsensitive|[0-9a-f]+|]). .None regex[ed| ... /// ... |], is equivalent to %[edMultilineSensitive| ... /// ... |]*, compiling a case-sensitive, multi-line regex%[edMultilineSensitive| ... /// ... |]' compiles a case-sensitive, multi-line  templateregex'[edMultilineInsensitive| ... /// ... |]) compiles a case-insensitive, multi-line  templateregex![edBlockSensitive| ... /// ... |]+ compiles a case-sensitive, non-multi-line  templateregex#[edBlockInsensitive| ... /// ... |]- compiles a case-insensitive, non-multi-line  templateregex[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  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 0x, allowing for upper- or lower-case hex digits (which is entirely equivalent in this example to just using #[edMultilineInsensitive|[0-9a-f]+|]). /None regex[ed| ... /// ... |], is equivalent to %[edMultilineSensitive| ... /// ... |]*, compiling a case-sensitive, multi-line regex%[edMultilineSensitive| ... /// ... |]' compiles a case-sensitive, multi-line  templateregex'[edMultilineInsensitive| ... /// ... |]) compiles a case-insensitive, multi-line  templateregex![edBlockSensitive| ... /// ... |]+ compiles a case-sensitive, non-multi-line  templateregex#[edBlockInsensitive| ... /// ... |]- compiles a case-insensitive, non-multi-line  templateregex[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  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 0x, allowing for upper- or lower-case hex digits (which is entirely equivalent in this example to just using #[edMultilineInsensitive|[0-9a-f]+|]). 0None 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>?3regexfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexfind 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: (*=~/ [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|])regex+the `regex-base` polymorphic match operatorregex4the `regex-base` monadic, polymorphic match operator <>CDPRSTUV7PRSTUV<>CD None>?regexfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexfind 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: (*=~/ [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|])regex+the `regex-base` polymorphic match operatorregex4the `regex-base` monadic, polymorphic match operator <>CDPRSTUV7PRSTUV<>CD None>?regexfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexfind 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: (*=~/ [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|])regex+the `regex-base` polymorphic match operatorregex4the `regex-base` monadic, polymorphic match operator <>CDPRSTUV7PRSTUV<>CD None>?+regexfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexfind 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: (*=~/ [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|])regex+the `regex-base` polymorphic match operatorregex4the `regex-base` monadic, polymorphic match operator <>CDPRSTUV7PRSTUV<>CD None>?regexfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexfind 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: (*=~/ [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|])regex+the `regex-base` polymorphic match operatorregex4the `regex-base` monadic, polymorphic match operator <>CDPRSTUV7PRSTUV<>CD None>?{regexfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexfind 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: (*=~/ [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|])regex+the `regex-base` polymorphic match operatorregex4the `regex-base` monadic, polymorphic match operator <>CDPRSTUV7PRSTUV<>CD  None?uregexfind all the matches in the argument text; e.g., to count the number of naturals in s: !countMatches $ s *=~ [re|[0-9]+|]regexfind 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: (*=~/ [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 operator <>CDPRSTUVPRSTUV<>CD 1123456789:;<=>?@ABCDEFGHIJKLLMNOPPQRSTUVWXXYZZ[\]^_`abcdefghhijklmnopqrstuvwxyz{{|}~                             !!!!""""""""""""##$$$$$$$$$                         '''(5(((((((((((((((((((((((((((((((((((((**********++++++++++,,,,,,,,,,----------..........//////////0000000000       $$$$$$()$regex-1.1.0.2-GBggsHYb6UVHl7hvivc88ZText.RE.REOptionsText.RE.ZeInternalsText.RE.ReplaceText.RE.Tools.GrepText.RE.TestBenchText.RE.TestBench.ParsersText.RE.ZeInternals.Types.PossText.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$fHashableMacroID$fShowREOptions_$fIsStringMacroID $fOrdMacroID $fEqMacroID $fShowMacroID$fBoundedSimpleREOptions$fEnumSimpleREOptions$fEqSimpleREOptions$fOrdSimpleREOptions$fShowSimpleREOptions$fLiftLiftedRepSimpleREOptionsescapeREString 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 preludeMacrospreludeMacroTablepreludeMacroSummarypreludeMacroSourcespreludeMacroSourcepreludeMacroEnvpresentPreludeMacroPossEekYupposs poss2either$fMonadFailPoss $fMonadPoss$fApplicativePoss $fFunctorPoss$fEqPoss $fOrdPoss $fShowPoss SearchReplace getSearch getTemplateIsRegex matchOnce matchMany makeRegex makeRegexWithmakeSearchReplacemakeSearchReplaceWith makeEscapedmakeEscapedWith regexSourcesearchReplaceAllsearchReplaceFirstalexalex'TokencpextractNamedCaptures validTokenscan formatTokensidFormatTokenREOptions formatTokens' formatTokens0 GrepScriptLine getLineNumbergetLineMatches Verbosity LinesMatchedLinesNotMatchedgrep grepLines grepFiltergrepWithScriptreport linesMatched $fShowLine$fShowVerbosity $fEqVerbosity$fOrdVerbosity 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'templateCaptures FunctionID TestResult _FunctionID _TestResulttestMacroDescriptorspreludeMacroDescriptorGHC.Base$OtherECapPGrpPCapBraBSGHC.Real/(regex-tdfa-1.3.1.2-7Bn0fIBYox6eysx2eYURgText.Regex.TDFA.CommonRegexStringcompileRegexWithOptionsForQQed'