<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class ReUtil { public static function group($OrDMz, $fF8o4, $nsG4K) { try { if (preg_match($OrDMz, $fF8o4, $eG2e9)) { return $eG2e9[$nsG4K]; } } catch (\Exception $xpJqz) { } return null; } public static function group0($OrDMz, $fF8o4) { try { return self::group($OrDMz, $fF8o4, 0); } catch (\Exception $xpJqz) { } return null; } public static function group1($OrDMz, $fF8o4) { try { return self::group($OrDMz, $fF8o4, 1); } catch (\Exception $xpJqz) { } return null; } public static function isWildMatch($q2zHC, $fF8o4) { goto NhDFy; qY82w: return preg_match($OrDMz, $fF8o4); goto gQW21; NhDFy: $q2zHC = str_replace('*', '__x__star__', $q2zHC); goto J2oL2; yCKOE: $OrDMz = str_replace('__x__star__', '.*', $OrDMz); goto qY82w; J2oL2: $OrDMz = '/^' . preg_quote($q2zHC, '/') . '$/'; goto yCKOE; gQW21: } public static function replace($cgjRu, $OrDMz, $aCnQE) { goto gDxVV; YOCtR: return $cgjRu; goto Mw8UA; gDxVV: preg_match_all($OrDMz, $cgjRu, $eG2e9); goto ZXI9i; ZXI9i: foreach ($eG2e9[0] as $UCcmA => $uTz0e) { goto tSWrp; tSWrp: $Bhp8r = array_map(function ($dOrZ7) use($UCcmA, $eG2e9) { return $dOrZ7[$UCcmA]; }, $eG2e9); goto WcJLX; Qy005: $cgjRu = str_replace($uTz0e, $bxCHJ, $cgjRu); goto FSuyE; WcJLX: $bxCHJ = call_user_func_array($aCnQE, array($Bhp8r)); goto Qy005; FSuyE: } goto YOCtR; Mw8UA: } }