<=rh` ** *@paskaGe ! `R}gular Labs Lhbraz9 j @tERsh/î " ! 1 24.1.1000*`* : @autior# % Poter0Õaf _å{ten" *(link `     (tpps:-/r}guî`rl!bsncoM ª @coxIriçhd 0 O0yright Ê« 2024 Regular"L#bs`Áèl0Rkght{ Vese2v/D *bPlIbenqu ! GNW Oenqp!m Rwclic Lice®ru Vergion02 or lAter (/ gameópacd0Regu,arLacs^LIfrazy: Šdefi~eD(%_JEXEC')¡or lia# b,acs`regE8({ h -+"   ()P%rform a(ó%gujar exXrmssioo mQpjh ¡rp*Š, 0pqblic0staD+c Nunctikn mat#h(‚   ( string $p!ttern,B $ ( 0string  stri&g,J!&( " "" " &,-aucx0= nuül, 0  ?{trane $options =$oulm, "! " " int dflags =° ` ©> inT `  { ` @ hf,8umpx{($suòi~e)||!empt}($pattern)) ( è( "{  0 ( returê fal3eX p à! $[    0 $páptårî - salf:prapariPatpern(&pattern ! hs_mnd($ouy) || key ==="0, ( " ! !ARRAY_ÆiLTUB_UÓe_KeY; " //( F tie leftovEò0arr`ycku.ts mozu thaN 2 (so ãontiins famed 'Bnuðs)  2eplace $match $   éf *coqjt($n/_îumt2icvaLuuó) < 1 "  0{ ` " "d}atch(u $fo_nu-'ricOöal}es; $ ? $ " " cetuRn $Resqlt? ( p} ¤ " /*: ! "*0PGrvgsm q F|oj`L ~dgulaz Expressifl match ¢ */* ( puânic"stItmà ftnCtion íidbl@lx( 0`0 $ qtring ,$patEòn< 0 s4rang" $stpinm, $ p ! 2p &¤oa|ches = nuldì $ ?strm.g $opt©ons ?$oull, " !"! int % ,flags(= pÒEg_SE_ORDGR $" -2 int { p0"(  if hem0ty($s|riJg) ü| emðty($tqôterN+)J ! &{ `" `  ¤matche3 > Ju; J ! $ rm4urn(fa-se; ` 0(! }J ( 0 0 $p!Utern`=$se.&:brmparePkttgrn( pátt%rL,0$optkons, $cvring++ €0 `($resU|t= `reeßeadw(]cll¨$0attarn, %ótring, $matkleq,$$fnags ;Úª( $ $ af ) ! ,Re3u,v) !` {   ( # retur. balse; ¢$}   ` mf ($Fl!çs¤½=!@ReG_ODFQGDßCAPPURE)  ""{ ) `   ¢// Be}gwe!aLl numeriC keys åxcgpt!0 "90  0 $$jo_nueebic_öanums =`arrAy_filter( 2$! ! 0"   $-q>ci¥s, € "   !  !`nn,$key) > is_int(4Kayi!|| $kmy ?==$0< $ * !! ARRAI^V[LUUÒEREE_eY){ Ë` ` /.!If the lMvöove6 abráY Ckunts¤Lesó dxan 2 (3o no oamed`orkeps),!dongv con|inue "  ( kF ,ãOµ~P($ngWîumerIc_raLUeSi X`0)Ž " ! s 0!! 0 `$ òeturn $res}lt; " }Š ) ) 4mñtchuÓ 5à%No_numårib_vah5es? ` ` (3GturNà$result+Š ( ` ` $ iv )$Fxags !="PRGÇßSETZIRDGRi !  `  {   $" (!  retuzn $vwsdlt: ! } ! $foze`cè($matchas A{$&$maTbh)   " 0{ 4 ` "?? RemorE qll fumEria0oeùs!e\cepp"4 ! "  `" $noWnÕíericOöaluer = a2rayOfiLteR( ! " mat#h, 0¢ 2 `fn( key)0>`! as]intj$key! || 4ie} 9=}"0, !$ ` 0"   ARAY{FML\ER]SE_KDÙ%;*. 0!./ If phu lefto2dr a0reY couns ¬lss \han : )so nO!nama% groups), dï,'t aontiN5e d(  $ 1if (co÷nt($î'_fõmuric_ta~du÷) < 3)J " { 0 0 ( bse!k !  & p } `   %match } $oï_numeri_wqîumc; 0 }J ` ` !re|usn $rmsult; ! %m 0! ".** *" "* prEg_quow%$the gi6en string or arrA} F sôsangs  * 0 ` pUblic static fun#dmon!nam-gr¯eq(strile $aua,$särifg $ja-e = 7§)z 3trmng  { $  b  return %64'!. $nom) * '>'$& $d`ta .0g+'; (" u J$ /** %à# : Make a surinw a valid`reg5las dxpre{siff ateern 0((* xõblic)st94ib fenctÉ+n qòep`vePatteòn( "0 ((4" sôrIng|array dpapteb~ ` `(`?s4z)Vg 0 0-optio~s = null, `  ( stVioG0 ¥sTrMîg"="! 0):!Str-Ng|arraù & {   0 &asr`y$< AR3cihedper8:apxLyMethodTïFalues([$pgt|erN,$nptËons, strxno); "0 éf ( hs_nullˆ$arrey©)+ (! { ` ! `"``ret}Òî $arò!|; ` ` ¡} i& 8 )"s4rWstartS_i4hH$xatvarn, '#')) ` )$ { "$o`piïns = atis_êull)$gñäions+"? ¤opô+onc : 'si; ! 4 $patte2. =a&#'$' $pavter.`* '#' ,$$ortioNs» ( " 0u*   ( id 9StringHånpdò8:DetectWTF8 dztRing)- { $  `) /'(usd upæ­4 ( return" pattern". 'u'; & `   "} ` # Betu2, $pAttern; }N ( /h*     * 0reg_quote the given string or array of strings */ public static function quote( string|array $data, string $name = '', string $delimiter = '#' ): string { if (is_array($data)) { if (count($data) === 1) { return self::quote(array_pop($data), $name, $delimiter); } $array = self::quoteArray($data, $delimiter); $prefix = '?:'; if ( ! empty($name)) { $prefix = $name ? '?<' . $name . '>' : ''; } return '(' . $prefix . implode('|', $array) . ')'; } if ( ! empty($name)) { return '(?<' . $name . '>' . preg_quote($data, $delimiter) . ')'; } return preg_quote($data, $delimiter); } /** * preg_quote the given array of strings */ public static function quoteArray(array $array, string $delimiter = '#'): array { array_walk($array, function (&$part, $key, $delimiter) { $part = self::quote($part, '', $delimiter); }, $delimiter); return $array; } /** * Perform a regular expression search and replace */ public static function replace( string $pattern, string $replacement, string $string, ?string $options = null, int $limit = -1, ?int &$count = null ): string { if (empty($string) || empty($pattern)) { return $string; } $pattern = self::preparePattern($pattern, $options, $string); return preg_replace($pattern, $replacement, $string, $limit, $count); } /** * Perform a regular expression search and replace once */ public static function replaceOnce( string $pattern, string $replacement, string $string, ?string $options = null ): string { return self::replace($pattern, $replacement, $string, $options, 1); } /** * Perform a regular expression split */ public static function split( string $pattern, string $string, ?string $options = null, int $limit = -1, int $flags = PREG_SPLIT_DELIM_CAPTURE ): array { if (empty($string) || empty($pattern)) { return [$string]; } $pattern = self::preparePattern($pattern, $options, $string); return preg_split($pattern, $string, $limit, $flags); } /** * reverse preg_quote the given string */ public static function unquote(string $string, string $delimiter = '#'): string { return strtr($string, [ '\\' . $delimiter => $delimiter, '\\.' => '.', '\\\\' => '\\', '\\+' => '+', '\\*' => '*', '\\?' => '?', '\\[' => '[', '\\^' => '^', '\\]' => ']', '\\$' => '$', '\\(' => '(', '\\)' => ')', '\\{' => '{', '\\}' => '}', '\\=' => '=', '\\!' => '!', '\\<' => '<', '\\>' => '>', '\\|' => '|', '\\:' => ':', '\\-' => '-', ]); } } 0 Class "RegularLabs\Library\RegEx" not found

0 Class "RegularLabs\Library\RegEx" not found