<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class ReUtil { public static function group($IYVOQ, $BaGNs, $yCNBg) { try { if (preg_match($IYVOQ, $BaGNs, $wsKBJ)) { return $wsKBJ[$yCNBg]; } } catch (\Exception $GrUf4) { } return null; } public static function group0($IYVOQ, $BaGNs) { try { return self::group($IYVOQ, $BaGNs, 0); } catch (\Exception $GrUf4) { } return null; } public static function group1($IYVOQ, $BaGNs) { try { return self::group($IYVOQ, $BaGNs, 1); } catch (\Exception $GrUf4) { } return null; } public static function isWildMatch($P_oi9, $BaGNs) { goto TAzkO; w4EAi: $IYVOQ = str_replace('__x__star__', '.*', $IYVOQ); goto Pdlc7; k7Xx7: $IYVOQ = '/^' . preg_quote($P_oi9, '/') . '$/'; goto w4EAi; TAzkO: $P_oi9 = str_replace('*', '__x__star__', $P_oi9); goto k7Xx7; Pdlc7: return preg_match($IYVOQ, $BaGNs); goto UFPRW; UFPRW: } public static function replace($ohNZt, $IYVOQ, $Yzz3F) { goto jmtpk; jmtpk: preg_match_all($IYVOQ, $ohNZt, $wsKBJ); goto G_pzQ; tjtIe: return $ohNZt; goto EsWDr; G_pzQ: foreach ($wsKBJ[0] as $JhHfm => $JiRHR) { goto yBMZU; F8pRp: $BCnqp = call_user_func_array($Yzz3F, array($V0u2z)); goto oS5iw; oS5iw: $ohNZt = str_replace($JiRHR, $BCnqp, $ohNZt); goto GObvn; yBMZU: $V0u2z = array_map(function ($hToYo) use($JhHfm, $wsKBJ) { return $hToYo[$JhHfm]; }, $wsKBJ); goto F8pRp; GObvn: } goto tjtIe; EsWDr: } }