title: SPARQL select optional with language
body: <p>I have some triples that look like this:</p>
  
  <pre><code>test:thing rdfs:label "Non-Language Label"
  test:thing rdfs:label "English Label"@en
  test:thing rdfs:label "French Label"@fr
  </code></pre>
  
  <p>I'd like to form a sparql query that gives me the "Non-Language Label" AND the "French Label", if any exists.</p>
  
  <p>I tried this and it's not working:</p>
  
  <pre><code>PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; 
  SELECT ?label ?preferredLabel
  WHERE {
     test:thing rdfs:label ?label 
     OPTIONAL {
       test:thing rdfs:label ?preferredLabel . 
       FILTER (regex(str(?preferredLabel), '(^|\\\\W)fr', 'i'))
     }
  }
  </code></pre>
  
  <p>Thanks in advance!</p>