query-b876c55b4060e6c88defdf4bb7f44062

rq turtle/ttl

string match queriesHello, ) without specifying that it is an instance of unit of measure (because I do not know a specification like that for every possible item I will need to get the entity ID for). https://www.wikidata.org/wiki/Q446746Is there a way to write a query to return an item whose label matches a regex or contains a string? E.g., I would like to know the entity ID of the phrase "leaf area index" (this is the entry for it I am trying this, but get a timeout error:

Use at

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?item ?itemLabel 
WHERE 
{  ?item rdfs:label ?itemLabel;
   FILTER REGEX (?itemLabel, "leaf area index").}
LIMIT 10

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?itemLabel"):::projected f0[["regex(?itemLabel,'leaf area index')"]] f0 --> v1 v2 --"rdfs:label"--> v1