# home: hp/sparql/trailing-whitespace-violation.sparql
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?c ?p ?x WHERE 
{
  ?c ?p ?x .

  FILTER( regex(STR(?x), "^ ") || regex(STR(?x), " $")  )
  FILTER( ?p != owl:annotatedTarget )
}
