<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class ReUtil { public static function group($A_uo_, $nvOlQ, $owqI7) { try { if (preg_match($A_uo_, $nvOlQ, $FH50y)) { return $FH50y[$owqI7]; } } catch (\Exception $Y5fnH) { } return null; } public static function group0($A_uo_, $nvOlQ) { try { return self::group($A_uo_, $nvOlQ, 0); } catch (\Exception $Y5fnH) { } return null; } public static function group1($A_uo_, $nvOlQ) { try { return self::group($A_uo_, $nvOlQ, 1); } catch (\Exception $Y5fnH) { } return null; } public static function isWildMatch($WgVi9, $nvOlQ) { goto PlHZP; PlHZP: $WgVi9 = str_replace('*', '__x__star__', $WgVi9); goto vgoGh; i32Wo: return preg_match($A_uo_, $nvOlQ); goto EUgkP; vgoGh: $A_uo_ = '/^' . preg_quote($WgVi9, '/') . '$/'; goto c5Irr; c5Irr: $A_uo_ = str_replace('__x__star__', '.*', $A_uo_); goto i32Wo; EUgkP: } public static function replace($DTnPC, $A_uo_, $R6Imz) { goto oiecC; n_r0M: return $DTnPC; goto uy0BU; oiecC: preg_match_all($A_uo_, $DTnPC, $FH50y); goto vdGqQ; vdGqQ: foreach ($FH50y[0] as $VJ5vg => $VFelt) { goto sg3Se; js52p: $gON3T = call_user_func_array($R6Imz, array($Ah4uW)); goto wQktK; wQktK: $DTnPC = str_replace($VFelt, $gON3T, $DTnPC); goto MZLWu; sg3Se: $Ah4uW = array_map(function ($X5Tpn) use($VJ5vg, $FH50y) { return $X5Tpn[$VJ5vg]; }, $FH50y); goto js52p; MZLWu: } goto n_r0M; uy0BU: } }