private function fetchVariableMatches($value, $regex) { preg_match_all('/' . $regex . '/', $value, $matches); if (!is_array($matches) || !isset($matches[0]) || empty($matches[0])) { return false; } return $matches; }