From 741dd725142848dd301ba3f0ca4c0358b12860c2 Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Sun, 10 Mar 2024 13:05:55 +0200 Subject: [PATCH] Fixing the invalid xref check --- docs/report_queries/invalid_xref.md | 2 +- robot-core/src/main/resources/report_queries/invalid_xref.rq | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/report_queries/invalid_xref.md b/docs/report_queries/invalid_xref.md index e3fca754b..a2ab3c4f5 100644 --- a/docs/report_queries/invalid_xref.md +++ b/docs/report_queries/invalid_xref.md @@ -11,7 +11,7 @@ PREFIX rdfs: SELECT DISTINCT ?entity ?property ?value WHERE { VALUES ?property {oboInOwl:hasDbXref} ?entity ?property ?value . - FILTER (!regex(?value, "^[a-z|A-Z|_|\\-|0-9]*:(?!$)\\S*$")) + FILTER (!regex(?value, "^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_]:[^\\s]+$")) FILTER (!isBlank(?entity)) } ORDER BY ?entity diff --git a/robot-core/src/main/resources/report_queries/invalid_xref.rq b/robot-core/src/main/resources/report_queries/invalid_xref.rq index 85b754264..fb6226279 100644 --- a/robot-core/src/main/resources/report_queries/invalid_xref.rq +++ b/robot-core/src/main/resources/report_queries/invalid_xref.rq @@ -10,7 +10,7 @@ PREFIX rdfs: SELECT DISTINCT ?entity ?property ?value WHERE { VALUES ?property {oboInOwl:hasDbXref} ?entity ?property ?value . - FILTER (!regex(?value, "^[a-z|A-Z|_|\\-|0-9]*:(?!$)\\S*$")) + FILTER (!regex(?value, "^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_]:[^\\s]+$")) FILTER (!isBlank(?entity)) } ORDER BY ?entity