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) }