fixed weird + issue

This commit is contained in:
Elias Papanikitas
2023-11-21 11:09:07 +01:00
parent 30f4341e01
commit 866cff52cc

View File

@@ -35,9 +35,9 @@ WHERE {
?s <http://schema.org/telephone> ?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 <http://schema.org/telephone> ?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)
}