/usr/local/lib64/python3.6/site-packages/regex/__pycache__
NameSizeModeActions
regex.cpython-36.pyc260070644editdlrm
test_regex.cpython-36.pyc1395230644editdlrm
_regex_core.cpython-36.pyc1131780644editdlrm
__init__.cpython-36.pyc2030644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/regex/__pycache__/regex.cpython-36.pyc (26007B)
3 Eg+9@sHdZddddddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9g9Zd:Zd_d>dZd`d?dZdad@d ZdbdAd ZdcdBdZdddCdZdedDdZ dfdEd Z dgdFd Z dhdGdZ didHdZ djdIdZdJd ZdKadkdLdZdldMdZdmdNdZd;ddVdWZ?dXdYZ@e?dZd;d=id=ZAeBeAZCeBeAjdZZD[AejEd[ejEd\eZFd;d...) Atomic non-capturing version of regular parentheses. (?flags-flags:...) Non-capturing version of regular parentheses with local flags. (?P...) The substring matched by the group is accessible by name. (?...) The substring matched by the group is accessible by name. (?P=name) Matches the text matched earlier by the group named name. (?#...) A comment; ignored. (?=...) Matches if ... matches next, but doesn't consume the string. (?!...) Matches if ... doesn't match next. (?<=...) Matches if preceded by .... (? Matches the text matched by the group named name. \G Matches the empty string, but only at the position where the search started. \h Matches horizontal whitespace. \K Keeps only what follows for the entire match. \L Named list. The list is provided as a keyword argument. \m Matches the empty string, but only at the start of a word. \M Matches the empty string, but only at the end of a word. \n Matches the newline character. \N{name} Matches the named character. \p{name=value} Matches the character if its property has the specified value. \P{name=value} Matches the character if its property hasn't the specified value. \r Matches the carriage-return character. \s Matches any whitespace character; equivalent to [ \t\n\r\f\v]. \S Matches any non-whitespace character; equivalent to [^\s]. \t Matches the tab character. \uXXXX Matches the Unicode codepoint with 4-digit hex code XXXX. \UXXXXXXXX Matches the Unicode codepoint with 8-digit hex code XXXXXXXX. \v Matches the vertical tab character. \w Matches any alphanumeric character; equivalent to [a-zA-Z0-9_] when matching a bytestring or a Unicode string with the ASCII flag, or the whole range of Unicode alphanumeric characters (letters plus digits plus underscore) when matching a Unicode string. With LOCALE, it will match the set [0-9_] plus characters defined as letters for the current locale. \W Matches the complement of \w; equivalent to [^\w]. \xXX Matches the character with 2-digit hex code XX. \X Matches a grapheme. \Z Matches only at the end of the string. \\ Matches a literal backslash. This module exports the following functions: match Match a regular expression pattern at the beginning of a string. fullmatch Match a regular expression pattern against all of a string. search Search a string for the presence of a pattern. sub Substitute occurrences of a pattern found in a string using a template string. subf Substitute occurrences of a pattern found in a string using a format string. subn Same as sub, but also return the number of substitutions made. subfn Same as subf, but also return the number of substitutions made. split Split a string by the occurrences of a pattern. VERSION1: will split at zero-width match; VERSION0: won't split at zero-width match. splititer Return an iterator yielding the parts of a split string. findall Find all occurrences of a pattern in a string. finditer Return an iterator yielding a match object for each match. compile Compile a pattern into a Pattern object. purge Clear the regular expression cache. escape Backslash all non-alphanumerics or special characters in a string. Most of the functions support a concurrent parameter: if True, the GIL will be released during matching, allowing other Python threads to run concurrently. If the string changes during matching, the behaviour is undefined. This parameter is not needed when working on the builtin (immutable) string classes. Some of the functions in this module take flags as optional parameters. Most of these flags can also be set within an RE: A a ASCII Make \w, \W, \b, \B, \d, and \D match the corresponding ASCII character categories. Default when matching a bytestring. B b BESTMATCH Find the best fuzzy match (default is first). D DEBUG Print the parsed pattern. E e ENHANCEMATCH Attempt to improve the fit after finding the first fuzzy match. F f FULLCASE Use full case-folding when performing case-insensitive matching in Unicode. I i IGNORECASE Perform case-insensitive matching. L L LOCALE Make \w, \W, \b, \B, \d, and \D dependent on the current locale. (One byte per character only.) M m MULTILINE "^" matches the beginning of lines (after a newline) as well as the string. "$" matches the end of lines (before a newline) as well as the end of the string. P p POSIX Perform POSIX-standard matching (leftmost longest). R r REVERSE Searches backwards. S s DOTALL "." matches any character at all, including the newline. U u UNICODE Make \w, \W, \b, \B, \d, and \D dependent on the Unicode locale. Default when matching a Unicode string. V0 V0 VERSION0 Turn on the old legacy behaviour. V1 V1 VERSION1 Turn on the new enhanced behaviour. This flag includes the FULLCASE flag. W w WORD Make \b and \B work with default Unicode word breaks and make ".", "^" and "$" work with Unicode line breaks. X x VERBOSE Ignore whitespace and comments for nicer looking REs. This module also defines an exception 'error'. cache_allcompileDEFAULT_VERSIONescapefindallfinditer fullmatchmatchpurgesearchsplit splititersubsubfsubfnsubntemplateScannerAASCIIBZ BESTMATCHDDEBUGEZ ENHANCEMATCHSDOTALLFZFULLCASEI IGNORECASELLOCALEM MULTILINEPZPOSIXRREVERSETTEMPLATEUUNICODEZV0VERSION0ZV1VERSION1XVERBOSEWZWORDerrorRegex __version____doc__ RegexFlagz2.5.132NFc Ks$t|||| d} | j||||||S)zqTry to apply the pattern at the start of the string, returning a match object, or None if no match was found.T)_compiler) patternstringflagsposendpospartial concurrenttimeout ignore_unusedkwargspatr@7/usr/local/lib64/python3.6/site-packages/regex/regex.pyrsc Ks$t|||| d} | j||||||S)zpTry to apply the pattern against all of the string, returning a match object, or None if no match was found.T)r4r) r5r6r7r8r9r:r;r<r=r>r?r@r@rArsc Ks$t|||| d} | j||||||S)zvSearch through string looking for a match to the pattern, returning a match object, or None if no match was found.T)r4r ) r5r6r7r8r9r:r;r<r=r>r?r@r@rAr sc Ks&t||| | d} | j|||||||S)atReturn the string obtained by replacing the leftmost (or rightmost with a reverse pattern) non-overlapping occurrences of the pattern in string by the replacement repl. repl can be either a string or a callable; if a string, backslash escapes in it are processed; if a callable, it's passed the match object and must return a replacement string to be used.T)r4r ) r5replr6countr7r8r9r;r<r=r>r?r@r@rAr sc Ks&t||| | d} | j|||||||S)arReturn the string obtained by replacing the leftmost (or rightmost with a reverse pattern) non-overlapping occurrences of the pattern in string by the replacement format. format can be either a string or a callable; if a string, it's treated as a format string; if a callable, it's passed the match object and must return a replacement string to be used.T)r4r) r5formatr6rCr7r8r9r;r<r=r>r?r@r@rArsc Ks&t||| | d} | j|||||||S)aReturn a 2-tuple containing (new_string, number). new_string is the string obtained by replacing the leftmost (or rightmost with a reverse pattern) non-overlapping occurrences of the pattern in the source string by the replacement repl. number is the number of substitutions that were made. repl can be either a string or a callable; if a string, backslash escapes in it are processed; if a callable, it's passed the match object and must return a replacement string to be used.T)r4r) r5rBr6rCr7r8r9r;r<r=r>r?r@r@rAr"s c Ks&t||| | d} | j|||||||S)aReturn a 2-tuple containing (new_string, number). new_string is the string obtained by replacing the leftmost (or rightmost with a reverse pattern) non-overlapping occurrences of the pattern in the source string by the replacement format. number is the number of substitutions that were made. format can be either a string or a callable; if a string, it's treated as a format string; if a callable, it's passed the match object and must return a replacement string to be used.T)r4r) r5rDr6rCr7r8r9r;r<r=r>r?r@r@rAr.s c Ks t||||d}|j||||S)aSplit the source string by the occurrences of the pattern, returning a list containing the resulting substrings. If capturing parentheses are used in pattern, then the text of all groups in the pattern are also returned as part of the resulting list. If maxsplit is nonzero, at most maxsplit splits occur, and the remainder of the string is returned as the final element of the list.T)r4r ) r5r6maxsplitr7r;r<r=r>r?r@r@rAr :sc Ks t||||d}|j||||S)z8Return an iterator yielding the parts of a split string.T)r4r ) r5r6rEr7r;r<r=r>r?r@r@rAr Esc Ks$t|||| d} | j||||||S)a'Return a list of all matches in the string. The matches may be overlapped if overlapped is True. If one or more groups are present in the pattern, return a list of groups; this will be a list of tuples if the pattern has more than one group. Empty matches are included in the result.T)r4r) r5r6r7r8r9 overlappedr;r<r=r>r?r@r@rArKsc Ks&t||| | d} | j|||||||S)zReturn an iterator over all matches in the string. The matches may be overlapped if overlapped is True. For each match, the iterator returns a match object. Empty matches are included in the result.T)r4r) r5r6r7r8r9rFr:r;r<r=r>r?r@r@rArTscKs|dkr t}t|||||S)zACompile a regular expression pattern, returning a pattern object.N) _cache_allr4)r5r7r=Z cache_patternr>r@r@rAr]scCstjtjdS)z"Clear the regular expression cacheN)_cacheclear_locale_sensitiver@r@r@rAr csTcCs|dkr tS|adS)zSets whether to cache all patterns, even those are compiled explicitly. Passing None has no effect, but returns the current setting.N)rG)valuer@r@rArkscCst||tBdidS)z7Compile a template pattern, returning a pattern object.F)r4r&)r5r7r@r@rAruscCst|tr|jd}n|}g}|rx|D]`}|dkrD|rD|j|q(|tksT|jrj|jd|j|q(|dkr~|jdq(|j|q(Wnbx`|D]X}|dkr|r|j|q|tkr|j|q|dkr|jdq|jd|j|qWdj|}t|tr|jd}|S)zEscape a string for use as a literal in a pattern. If special_only is True, escape only special characters, else escape all non-alphanumeric characters. If literal_spaces is True, don't escape spaces.zlatin-1 \z\000) isinstancebytesdecodeappend _METACHARSisspace_ALNUMjoinencode)r5Z special_onlyZliteral_spacespscrr@r@rArys6                 )RLock)getpreferredencoding)*) _ALL_VERSIONS_ALL_ENCODINGS_FirstSetError_UnscopedFlagSet_check_group_features_compile_firstset_compile_replacement _flatten_code _fold_case_get_required_string_parse_pattern _shrink_cache)ALNUMInfoOPSourceFuzzyz()[]{}?*+|^$\.-#&~ic)3syddlmaWntk r$YnX|t@dkr6d}t||f}tj|dsZ|t@dkrbt}nd}fdd}|r.y|t||f}t |t } rxND]F\} } y| j | t | fWqt k rtdj| YqXqW|t | } |t||| t|f} t| St k r,YnXt|tr@t} n8t|trRt} n&t|trp|rltd |Std tt_|}xd}ytd ||j'jt)@pLt}|dt*t+fkrftd jt,@dtttfkrtd t|trjt@rtdjt,@st|trΈjtO_njtO_tjt-@}t|t.}j/t|<d}y|j0||dWn(tk r<}z |}WYdd}~XnX|rVt|j%|j&|j'|t@rn|j1d|d|j2|}|j3}t4|j\}}}i}dgt5j6}t xlj6j7D]^\}}|\}}t |}|rt fdd|D} n|} |||<| ||<j ||fqW|t8||j9|}!d||f}j:j|}"|"dk rrt;j<|"fg|!t;j=fg}!|!t;j>fg7}!x&j?D]\}#}$}%|!|#j9|$|%7}!qWt@|!}!|jAsy$tB|jC|}&t@|&}&|&|!}!WntDk rYnXtEddjFj7D}'tGj9|j|B|!jF|'|||||jH }(t5ttIkrbtJtKtt ttIWdQRX|rjt@dkr|d}t |t||t|f} |(t| <t |<|(S)z1Compiles a regular expression to a PatternObject.r3)rFTNcs@rdStddD}|rsz9_compile..complain_unused_args..zunused keyword argument {!a})setnextiter ValueErrorrD)Z unused_kwargsZany_one) args_neededr=r>r@rAcomplain_unused_argss  z&_compile..complain_unused_argszmissing named list: {!r}z5cannot process flags argument with a compiled patternz3first argument must be a string or compiled patternzunbalanced parenthesisz5VERSION0 and VERSION1 flags are mutually incompatiblez9ASCII, LOCALE and UNICODE flags are mutually incompatiblez,cannot use UNICODE flag with a bytes pattern)indentreversec3s|]}t|VqdS)N)rh)rqrs)infor@rA ]sz_compile..css|]\}}||fVqdS)Nr@)rqnrsr@r@rAr~s)Lregexr ImportErrorrtyperJgetr_getpreferredencoding _named_argsruadd frozensetKeyErrorr.rDrHrPstrr(rQrPatternrx TypeError _regex_core_Source_InfoZ char_typeguess_encodingboolr7r,Z ignore_spacerjrc global_flagsmsgr5r8Zat_endr`r)r*rar$_FuzzyZ inline_localeZ fix_groupsdumpZoptimiseZpack_charactersrilenZnamed_lists_useditemsrdrZ call_refs_OPZCALL_REFZENDSUCCESSZadditional_groupsrgZhas_simple_startreZ get_firstsetrbdictZ group_index_regexZ group_count _MAXCACHE _cache_lockrk))r5r7r=r>Zcache_itZ locale_keyZpattern_localerzZargs_keyZ args_suppliedrrrsZ pattern_keyrrZcaught_exceptionsourceparsedeversionr|ZfuzzyZ req_offsetZ req_charsZ req_flagsZ named_listsZnamed_list_indexeskeyindexnameZ case_flagsvaluesrcoderefgrouprevZfuzZfs_code index_groupZcompiled_patternr@)ryr=r}r>rAr4s                             r4c Cs|j|j|f}tj|}|dk r$|Stttkr8tjt|t}t |}|rXdd}ndd}g}g}xj|j}|sxP|dkrt |||\} } | r|r|j ||g}|j | q|j | qj|j t |qjW|r|j |||t|<|S)z Compiles a replacement template.NcSsdjdd|DS)NrOcss|]}t|VqdS)N)chr)rqr[r@r@rAr~szC_compile_replacement_helper..make_string..)rW) char_codesr@r@rA make_stringsz0_compile_replacement_helper..make_stringcSst|S)N)rQ)rr@r@rArsrM)r5r7_replacement_cacherr _MAXREPCACHErIrPrrrfrSextendord) r5rrZcompiledZ is_unicoderrliteralchZis_grouprr@r@rA_compile_replacement_helpers<      rrOrMatchcCs tj|jfS)N)rrZ _pickled_data)r5r@r@rA_picklesr)r3NNFNNF)r3NNFNNF)r3NNFNNF)r3r3NNNNF)r3r3NNNNF)r3r3NNNNF)r3r3NNNNF)r3r3NNF)r3r3NNF)r3NNFNNF)r3NNFFNNF)r3FN)T)r3)TF)Kr1__all__r0rrr r rrrr r rrrr rGrrrZregex._regex_corerZ regex._regexr threadingr]_RLocklocaler^rr`rarbrcrdrerfrgrhrirjrkrlrVrmrrnrrorrprr)rrrTrHrrrrJrrr4rZ_patrrrrSr/copyregZ _copy_regrpickler@r@r@rAs               ,    8b5