query-3a67f8e23ff0c5795873bda4b126fd5e
Extract columns from regexGiven the following query
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 ?item ?id ?name
WHERE {
?item p:P396 ?st .
?st ps:P396 ?id .
?st pq:P1810 ?name . FILTER(REGEX(?name, "<([\\S\\s]+\\d+[\\S\\s]*)-([\\S\\s]*)"))
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?id"):::projected
v2("?item"):::projected
v1("?name"):::projected
v3("?st")
f0[["regex(?name,'<(#91;\S\s#93;+\d+#91;\S\s#93;*)-(#91;\S\s#93;*)')"]]
f0 --> v1
v2 --"p:P396"--> v3
v3 --"p:statement/P396"--> v4
v3 --"p:qualifier/P1810"--> v1