The file extensions were changed from ttl to txt. On Monday, October 26, 2020 at 9:56:13 AM UTC-4 Clare Paul wrote:
> On Monday, October 26, 2020 at 9:52:45 AM UTC-4 Clare Paul wrote: > >> Holger, >> I've attached a couple of files. One file contains everything required >> to execute the SPARQL rule: ex:RuleForFindingBracketedNumbers. The rule's >> REGEX pattern has four backslashes prior to a square bracket. >> >> An example of a bracketed number is [4]. The sample resources are >> instances of the class ex:CandidateResource. The rule finds resource labels >> that match a REGEX pattern and types them as ex:BracketedNumber. >> >> The second file contains the SPARQL CONSTRUCT that was used to test the >> query. The REGEX pattern has two backslashes prior to a square bracket. >> >> The SPARQL CONSTRUCT was copied and then pasted as the value for >> sh:construct. >> >> After adding the backslashes to the REGEX pattern in the rule, everything >> worked as expected on EDG 6.4.2. >> >> Thanks, >> Clare >> >> Note: for some reason, Google Groups flags an error when I try to include >> the files. >> >> -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/56ba1c93-88c1-4f2d-8989-d3328285a333n%40googlegroups.com.
PREFIX ex: <http://example.org/ontologies/Square_Brackets_and_SHACL_Rules#> 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#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> CONSTRUCT {?res rdf:type ex:BracketedNumber .} WHERE { ?res a ex:CandidateResource . ?res rdfs:label ?res_label . #---------- VALUES ?find_pattern {'\\[[0-9]\\]'} FILTER(REGEX(?res_label,?find_pattern)) }
