query-bf699806526cd3082faaef80f80f12a7
title:Query con filtro (FILTER) basato sul REGEX applicato a una descrizione italiana SELECT ?item ?itemLabel ?desc WHERE { ?item wdt:P106 wd:Q13418253. ?item schema:description ?desc . FILTER(LANG(?desc) = 'it') FILTER(REGEX(?desc, "^[A-Z]")) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Query con filtro (FILTER) basato sul REGEX applicato a una descrizione italiana
SELECT ?item ?itemLabel ?desc
WHERE {
?item wdt:P106 wd:Q13418253.
?item schema:description ?desc .
FILTER(LANG(?desc) = 'it')
FILTER(REGEX(?desc, "^[A-Z]"))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?desc"):::projected
v2("?item"):::projected
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c4(["wd:Q13418253"]):::iri
f0[["regex(?desc,'^#91;A-Z#93;')"]]
f0 --> v1
f1[["?desc = 'it'"]]
f1 --> v1
v2 --"wdt:P106"--> c4
v2 --"schema:description"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end