SELECT ?item ?itemLabel ?bblid
WHERE {
?item wdt:P2580 ?bblid .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
FILTER (REGEX(STR(?bblid), "[\\.q]"))
}
- NOT before REGEX results in error message, while for FILTER NOT EXISTS it is fine.
- NOT FILTER results in error message
I would like to add FILTER and REGEX negation to the tutorial. Any idea?
Apart from that, during testing negation it was found that character class negation as describe at https://www.regular-expressions.info/refcharclass.html does not seem to work:
- FILTER REGEX(STR(?bblid), "[0-9]") results in 4037 items listed
- FILTER REGEX(STR(?bblid), "[^0-9]") results in 4239 items listed, and lists items where the ID contains [0-9]