3 À<×e*ã@s*ddlZddlmZGdd„dejƒZdS)éNé)Úbasecs,eZdZdZ‡fdd„Z‡fdd„Z‡ZS)Úregex_search_ternaryz· Ternary regex operator, it takes arguments in the following form STR1, REGEX, STR2, STR3 If REGEX matches STR1 (re.search is used), STR2 is returned, otherwise STR3 is returned cstt|ƒjdddƒdS)Nré)ÚsuperrÚ__init__)Úself)Ú __class__©ú3/usr/lib/python3.6/function_regex_search_ternary.pyr szregex_search_ternary.__init__cs<tt|ƒj|ƒsdStj|d|dƒr0|dS|dSdS)Nrréé)rrÚexecuteÚreÚsearch)rÚargs)r r r rs zregex_search_ternary.execute)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrÚ __classcell__r r )r r rs r)rÚrZFunctionrr r r r Ús