public static function getLiteralType ($literal)
    {
        preg_match('/^".*"(?:\^\^([^"]+)|(@)[^@"]+)?$/s',$literal,$match);//TODO: somehow the copied regex did not work. To be checked. Contained [^] instead of the .
        if (empty($match))
            throw new \Exception($literal . ' is not a literal');
        if (!empty($match[1])) {
            return $match[1];
        } else {
            return !empty($match[2]) ? self::RDFLANGSTRING : self::XSDSTRING;
        }
    }
public static function getLiteralType ($literal)
    {
        preg_match('/^".*"(?:\^\^([^"]+)|(@)[^@"]+)?$/s',$literal,$match);//TODO: somehow the copied regex did not work. To be checked. Contained [^] instead of the .
        if (empty($match))
            throw new \Exception($literal . ' is not a literal');
        if (!empty($match[1])) {
            return $match[1];
        } else {
            return !empty($match[2]) ? self::RDFLANGSTRING : self::XSDSTRING;
        }
    }
public static function getLiteralType ( $ literal ) { preg_match ( '/^".*"(?:\^\^([^"]+)|(@)[^@"]+)?$/s' , $ literal , $ match ) ; //TODO: somehow the copied regex did not work. To be checked. Contained [^] instead of the . if ( empty ( $ match ) ) throw new \ Exception ( $ literal . ' is not a literal' ) ; if ( ! empty ( $ match [ 1 ] ) ) { return $ match [ 1 ] ; } else { return ! empty ( $ match [ 2 ] ) ? self :: RDFLANGSTRING : self :: XSDSTRING ; } }
Gets the type of a literal in the N3 library
Gets the type of a literal in the N3 library