query-09429101a6d64f8a70932c26fc80a992

rq turtle/ttl

triple, restrict it to English labels, and then check if it starts with “Mr. ”. ?human rdfs:label ?labelWe get the label with the One can also use FILTER with a regular expression. In the following example

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?bblid
WHERE {  
    ?item wdt:P6357 ?bblid .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }  
    FILTER(!REGEX(STR(?bblid), "[\\.q]")) 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?bblid"):::projected v2("?item"):::projected c4(["bd:serviceParam"]):::iri c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not regex(str(?bblid),'#91;\.q#93;')"]] f0 --> v1 v2 --"wdt:P6357"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end