Closed nichtich closed 8 years ago
use v5.14; use RDF::Query; say RDF::Query->new(join "", <DATA>)->as_sparql; __DATA__ PREFIX bd: <http://www.bigdata.com/rdf#> PREFIX wikibase: <http://wikiba.se/ontology#> SELECT * WHERE { <http://www.wikidata.org/entity/Q1> ?p ?o . FILTER regex(?o,'^[0-9]+$') . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } }
Output
PREFIX bd: <http://www.bigdata.com/rdf#> PREFIX wikibase: <http://wikiba.se/ontology#> SELECT * WHERE { <http://www.wikidata.org/entity/Q1> ?p ?o . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . FILTER( REGEX(?o, "^[0-9]+$") ) . } }
instead of
PREFIX bd: <http://www.bigdata.com/rdf#> PREFIX wikibase: <http://wikiba.se/ontology#> SELECT * WHERE { <http://www.wikidata.org/entity/Q1> ?p ?o . FILTER( REGEX(?o, "^[0-9]+$") ) . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } }
That's a strange one!
Output
instead of