This content has been marked as final.
Show 2 replies
-
1. Re: How to use NOT EXISTS & Regex in my SPARQL Queries
alwu-Oracle Aug 9, 2011 4:15 PM (in response to 880207)Hi,
Is bound what you are looking for?
An example from http://www.w3.org/TR/rdf-sparql-query/
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?name
WHERE { ?x foaf:givenName ?givenName .
OPTIONAL { ?x dc:date ?date } .
FILTER ( bound(?date) ) }
To get a negation, you can use FILTER (!bound(...))
An example of regex is as follows.
SELECT ?sp ?c
WHERE
{ ?sp rdfs:subPropertyOf ?c FILTER regex(?c,"work","i") }
Thanks,
Zhe Wu -
2. Re: How to use NOT EXISTS & Regex in my SPARQL Queries
880207 Aug 11, 2011 4:47 PM (in response to alwu-Oracle)Hi Zhe,
Thanks it worked fine for my requirement.
Regards,
Manish Hardasmalani