query-376b53c21f701f5b7256e1dd724b156a
Query ]reply[09:10, 20 December 2020 (UTC)) talk (ShismaHere is how you get all the regexes with their property and replacement pattern--
Use at
- https://query.wikidata.org/sparql
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?p ?s ?r WHERE {
?stat ps:P8966 ?s.
OPTIONAL { ?stat pq:P8967 ?r. }
?prop p:P8966 ?stat.
BIND(REPLACE(STR(?prop), 'http://www.wikidata.org/entity/', '') AS ?p ).
} ORDER BY STRLEN(str(?s))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?p"):::projected
v4("?prop")
v3("?r"):::projected
v1("?s"):::projected
v2("?stat")
v2 --"p:statement/P8966"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P8967".-> v3
end
v4 --"p:P8966"--> v2
bind0[/"replace(str(?prop),'http://www.wikidata.org/entity/','')"/]
v4 --o bind0
bind0 --as--o v5