Hi,

I am using the following query to get all concepts that start with the word 
"Head". 


PREFIX text: <http://jena.apache.org/text#> 
PREFIX nci: <http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#> 
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
PREFIX owl: <http://www.w3.org/2002/07/owl#> 
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT * 
WHERE { 
?s text:query (nci:Preferred_Name 'Head') . 
?s nci:Preferred_Name ?prefName . 
FILTER ( regex(?prefName, "^Head", "" ))  
}


Is there a way of doing that in the text query itself without having to add a 
FILTER? I read that adding an asterisk "Head*" would work like "starts-with", 
but that also matches anywhere in the string. And the regular expression start 
of string symbol "^" does not work either.

Regards,
Wolfgang

Reply via email to