query: SELECT ?item ?itemLabel ?value ?result (STRLEN(STR(?value)) AS ?stringlength)  ?snak ?rank WHERE {
  	{
  		SELECT ?item ?value ?result ?snak ?rank WHERE {
  			{
  				?item p:P227 [ ps:P227 ?value; wikibase:rank ?rank ] . BIND("mainsnak" AS ?snak) .
  			} UNION {
  				?item ?p1 [ pq:P227 ?value; wikibase:rank ?rank ] . BIND("qualifier" AS ?snak) .
  			} UNION {
  				?item ?p2 [ wikibase:rank ?rank; prov:wasDerivedFrom [ pr:P227 ?value ] ] . BIND("reference" AS ?snak) .
  			} .
  			BIND( REGEX( STR( ?value ), "^(|(1[01]?\\d{7}[0-9X]|[47]\\d{6}-\\d|[1-9]\\d{0,7}-[0-9X]|3\\d{7}[0-9X]))$" ) AS ?regexresult ) .
  			FILTER( ?regexresult = false ) .
  			BIND( IF( ?regexresult = true, "pass", "fail" ) AS ?result ) .
  			FILTER( ?item NOT IN ( wd:Q4115189, wd:Q13406268, wd:Q15397819 ) ) .
  		} LIMIT 100
  	} .
  	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
  }