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;
    }
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;
    }
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 ; }
Fetches the variable matches in the string

@param string $value The string to fetch matches for
@param string $regex The variable type regex

@return array The matches
Fetches the variable matches in the string