Dear friends,
I am a beginner so please bear with me.
I find the """ """ style of writing the queries in my code very readable 
but I am not able to introduce a variable in it.
For example:
sparql.setQuery("""
select distinct ?id ?eurovoc
where {
?atto a ocd:aic . 
?atto dc:identifier ?id .
?atto ocd:startDate ?datapres .
?atto <http://purl.org/dc/terms/subject> ?eurovoc .
FILTER(REGEX(?datapres,'2021\\\\d{4}'))
} 
""")

in the above query I would like 2021 to be instantiated by a "year" 
variable I previously set in the code.

Any suggestions? Thank you very much and happy 2022
Robert

-- 
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 rdflib-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rdflib-dev/e6752549-3d70-413d-9844-338a76c2cfd2n%40googlegroups.com.

Reply via email to