W3C home > Mailing lists > Public > public-sparql-dev@w3.org > July to September 2006

language code and regex

From: Denis Gaertner <denis_gaertner@gmx.net>
Date: Sun, 17 Sep 2006 11:38:46 +0200
To: public-sparql-dev@w3.org
Message-Id: <1158485926.31370.7.camel@localhost.localdomain>

Hi,

another problem, language codes this time. I am trying to incorporate
the search using regex patterns and language codes having this data for
instance :

@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<http://johnsmith.org/Jonny>     a foaf:Person;
	foaf:name "John Smith";
	foaf:name "Smith"@en-US;
	foaf:name "Schmidt"@de .

I can do this: 

?x ?foaf:name "Schmidt"@de 
?x ?foaf:name ?name FILTER (?name = "Schmidt"@de)

but how do I get this with the regex function? 

This doesn't catch it: regex(?name, "^Schmidt$") && lang(?name) = "de")

Thanks

Denis
Received on Sunday, 17 September 2006 09:39:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:17:05 GMT