function reg_match($regex, $subject, &$matches, $offset = 0) { $result = preg_match($regex, $subject, $matches, PREG_OFFSET_CAPTURE, $offset); if ($result) { $f = create_function('&$X', '$X = $X[1] < 0 ? NULL : $X[0];'); array_walk($matches, $f); } return $result; } ----------------------------------------------------------------------------- Copyright 1997-2024 Jeffrey Friedl