regex is not defined on URIs - you have to cast it to a string: FILTER REGEX(str(?func), "off", "i") should work
- Gunnar On 20 September 2018 at 11:54, Kristina <[email protected]> wrote: > I wanted to use the RDFLib for SPARQL 1.1 Queries which should be supported. > I have a file in JSON-LD and simple SELECT query works fine. But when I add a > FILTER REGEX, the result is zero size and also no error. > Here is my code (abstracted): > > g = Graph() > g.parse("myontology.owl", format="json-ld") > result = g.query( > """SELECT ?func > WHERE { ?func rdf:type mo:Function . > FILTER REGEX (?func, "off", "i").}""", > initNs={"mo": "http://mynamespace#"}) > for row in result: > print("%s " % row) > > What is wrong with the FILTER REGEX? > I didn't find a good documentation how to use SPARQL Algebra in RDFLib. > Thank you for help! > > -- > http://github.com/RDFLib > --- > You received this message because you are subscribed to the Google Groups > "rdflib-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rdflib-dev/82048b7c-d125-410c-9feb-8689a3007267%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- http://gromgull.net -- http://github.com/RDFLib --- You received this message because you are subscribed to the Google Groups "rdflib-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/CAGm1ODk9Bqg%3DxN0G4iC20NEvR77X39hTBrbgEJXBusTYtCxh1g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
