Regex.php 342 B

12345678910111213141516
  1. <?php
  2. /**
  3. * The Feeler framework, licensed under Mit license
  4. * Author: Rick Guo
  5. */
  6. class Regex implements IRegex{
  7. public static function match($regex, $data){
  8. preg_match($regex, $data, $matches);
  9. return $matches;
  10. }
  11. public static function matchKeyWithType($data){
  12. return self::match("/^\s*?\((.*?)\)\s*?(.*?)\s*$/", $data);
  13. }
  14. }