<?php
 namespace ModStart\Core\Util; class ReUtil { public static function group($regex, $text, $groupIndex) { if (preg_match($regex, $text, $mat)) { return $mat[$groupIndex]; } return null; } public static function group0($regex, $text) { return self::group($regex, $text, 0); } public static function group1($regex, $text) { return self::group($regex, $text, 1); } } 