From 866cff52cc58448737873cf002c72288e5d98ac9 Mon Sep 17 00:00:00 2001 From: Elias Papanikitas Date: Tue, 21 Nov 2023 11:09:07 +0100 Subject: [PATCH] fixed weird + issue --- .../2023/20231112161533-update-phone-numbers.sparql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/migrations/2023/20231112161533-update-phone-numbers.sparql b/config/migrations/2023/20231112161533-update-phone-numbers.sparql index d7ac17e..78d38ac 100644 --- a/config/migrations/2023/20231112161533-update-phone-numbers.sparql +++ b/config/migrations/2023/20231112161533-update-phone-numbers.sparql @@ -35,9 +35,9 @@ WHERE { ?s ?o . } - FILTER (SUBSTR(?o, 1, 1) = "+" and !regex(?o, ".*[a-zA-Z].*", "i")) + FILTER (STRSTARTS(?o, "+") and !regex(?o, ".*[a-zA-Z].*", "i")) BIND(REPLACE(STR(?o),"[. -/()]","") AS ?removedSpaces) . - BIND (CONCAT('tel:', ?removedSpaces) as ?newPhoneNumber) + BIND (CONCAT('tel:+', ?removedSpaces) as ?newPhoneNumber) } ; @@ -79,8 +79,8 @@ WHERE { ?s ?o . } - FILTER (SUBSTR(?o, 1, 1) = "+" and !regex(?o, ".*[a-zA-Z].*", "i")) + FILTER (STRSTARTS(?o, "+") and !regex(?o, ".*[a-zA-Z].*", "i")) BIND(REPLACE(STR(?o),"[. -/()]","") AS ?removedSpaces) . - BIND (CONCAT('tel:', ?removedSpaces) as ?newPhoneNumber) + BIND (CONCAT('tel:+', ?removedSpaces) as ?newPhoneNumber) }