U if=@sddlZddlZddlZddlZz ddlZWnek rDdZYnXdddddddd d d d d dddddddddddddddddgZdZGd d!d!ejZ e e j ej Z d?d"dZd@d#dZdAd$dZdBd%dZdCd&dZdDd'dZdEd(dZdFd)d ZdGd*d Zd+d ZdHd,d Zd-d.d/DZd0d Zeed1dZeed1dd1ZiZd2Zd3d4Z e!ed5d6Z"d7d8Z#d9d:Z$ddl%Z%d;d<Z&e%'ee&e Gd=d>d>Z(dS)INmatch fullmatchsearchsubsubnsplitfindallfinditercompilepurgetemplateescapeerrorPatternMatchAILMSXUASCII IGNORECASELOCALE MULTILINEDOTALLVERBOSEUNICODEz2.2.1c@speZdZejZZejZZ ej Z Z ej ZZejZZejZZejZZejZZejZddZej Z dS) RegexFlagcCs|jdk rd|jS|j}g}|dk}|r2|}|jD],}||j@r8||jM}|d|jq8|rx|t|d|}|rt|dkrd|d}n d|}|S)Nzre.r|z~()~)_name__value_ __class__appendhexjoinlen)selfvaluemembersnegativemresr1'/opt/alt/python38/lib64/python3.8/re.py__repr__s&        zRegexFlag.__repr__N)!__name__ __module__ __qualname__ sre_compileSRE_FLAG_ASCIIrrSRE_FLAG_IGNORECASErrSRE_FLAG_LOCALErrSRE_FLAG_UNICODErrSRE_FLAG_MULTILINErrSRE_FLAG_DOTALLrrSRE_FLAG_VERBOSErrSRE_FLAG_TEMPLATETEMPLATETSRE_FLAG_DEBUGDEBUGr3object__str__r1r1r1r2rs        rcCst|||SN)_compilerpatternstringflagsr1r1r2rscCst|||SrF)rGrrHr1r1r2rscCst|||SrF)rGrrHr1r1r2rscCst|||||SrF)rGrrIreplrJcountrKr1r1r2rscCst|||||SrF)rGrrLr1r1r2rs cCst||||SrF)rGr)rIrJmaxsplitrKr1r1r2rscCst|||SrF)rGrrHr1r1r2rscCst|||SrF)rGr rHr1r1r2r scCs t||SrF)rGrIrKr1r1r2r scCsttdSrF)_cacheclear _compile_repl cache_clearr1r1r1r2r scCst||tBSrF)rGrArPr1r1r2r scCsi|]}|dt|qS)\)chr).0ir1r1r2 srYs()[]{}?*+-|^$\.&~# cCs2t|tr|tSt|d}|tdSdS)Nlatin1) isinstancestr translate_special_chars_mapencode)rIr1r1r2r s   ic Cst|tr|j}ztt|||fWStk r8YnXt|trT|rPtd|St |sft dt ||}|t @st ttkrztttt=Wntttfk rYnX|tt|||f<|S)Nz5cannot process flags argument with a compiled patternz1first argument must be string or compiled pattern)r[rr,rQtypeKeyErrorr ValueErrorr7isstring TypeErrorr rCr* _MAXCACHEnextiter StopIteration RuntimeError)rIrKpr1r1r2rG!s.     rGcCs t||SrF) sre_parseparse_template)rMrIr1r1r2rS;srScCst||}t||SrF)rlrmexpand_template)rIrr r1r1r2_expand@s rocCs>t||}|ds.t|ddkr.|ddS|fdd}|S)Nrr!cSs t||SrF)rlrn)rr r1r1r2filterKsz_subx..filter)rSr*)rIr rpr1r1r2_subxEs    rqcCst|j|jffSrF)rGrIrK)rkr1r1r2_pickleSsrrc@seZdZdddZddZdS)Scannerrc Csddlm}m}t|tr |j}||_g}t}||_ |D]H\}}| } | t ||| ddt ||ffg|| |dq|s  #