<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class ReUtil { public static function group($mY5v7, $uujLm, $wtRZi) { try { if (preg_match($mY5v7, $uujLm, $YANPA)) { return $YANPA[$wtRZi]; } } catch (\Exception $Sgh1N) { } return null; } public static function group0($mY5v7, $uujLm) { try { return self::group($mY5v7, $uujLm, 0); } catch (\Exception $Sgh1N) { } return null; } public static function group1($mY5v7, $uujLm) { try { return self::group($mY5v7, $uujLm, 1); } catch (\Exception $Sgh1N) { } return null; } public static function isWildMatch($olJ6t, $uujLm) { goto ZHjXs; Y6O3o: $mY5v7 = '/^' . preg_quote($olJ6t, '/') . '$/'; goto RlmF7; RlmF7: $mY5v7 = str_replace('__x__star__', '.*', $mY5v7); goto ei7EE; ei7EE: return preg_match($mY5v7, $uujLm); goto HVZw6; ZHjXs: $olJ6t = str_replace('*', '__x__star__', $olJ6t); goto Y6O3o; HVZw6: } public static function replace($gP2DQ, $mY5v7, $liNDm) { goto lIuUy; gbuiy: foreach ($YANPA[0] as $jqibn => $knQyJ) { goto YksTw; YksTw: $tEaF3 = array_map(function ($ZDofj) use($jqibn, $YANPA) { return $ZDofj[$jqibn]; }, $YANPA); goto qd3BB; qd3BB: $J6CJw = call_user_func_array($liNDm, array($tEaF3)); goto B107k; B107k: $gP2DQ = str_replace($knQyJ, $J6CJw, $gP2DQ); goto yleef; yleef: } goto SBJ0c; lIuUy: preg_match_all($mY5v7, $gP2DQ, $YANPA); goto gbuiy; SBJ0c: return $gP2DQ; goto oegB1; oegB1: } }