@rollin
To escape brackets in a SPARQL string, you can use the backslash () character before each opening and closing bracket. For example, if you want to escape a set of brackets in a SPARQL string, you can write it as follows:
1 2 3 4 |
SELECT * WHERE { ?s rdf:type ?o . FILTER regex(str(?o), "(example)") } |
In this example, the backslashes are used to escape the opening and closing brackets in the regex function, allowing the query to be executed without errors.