PREFIX u: SELECT DISTINCT * WHERE { ?id a u:ID . ?id u:full ?full . ?id u:nameFor ?res . ?id u:scheme ?scheme . ?id u:authority ?authority . OPTIONAL { ?id u:userinfo ?userinfo } . OPTIONAL { ?id u:host ?host } . OPTIONAL { ?id u:port ?port } . OPTIONAL { ?id u:path ?path } . OPTIONAL { ?id u:query ?query } . OPTIONAL { ?id u:fragment ?fragment } . # FILTER regex ( ?scheme, "http" ) . # schemes matching "http" ie. includes https: # FILTER regex ( ?scheme, "^http$" ) . # http: scheme # FILTER regex ( ?scheme, "^HTTP$" ) . # HTTP: scheme (do we normalise in the regex or the rdf?) # FILTER regex ( ?scheme, "^http$", "i" ) . # http: scheme, case insensitive (more robust) # FILTER regex(?scheme,"^http$","i") && ( (?port = "8080") || (?port = "1234") ). #FILTER regex(?userinfo, ":") # password is given in the URI FILTER regex(?host, "^pics|www\.pics") . }