Re: shapes-ISSUE-77 (sh:pattern flags): Shall sh:pattern also support sh:flags? [SHACL Spec]

Hi!

> Should this flag option also be added to SHACL? I am not sure if this
> is consistently supported by all potential execution platforms, yet
> doing things like ignore case is a common requirement in practice.

I guess the issue is that not all flags are consistently named or 
implemented in all potential execution platforms.

For example Javascript as in [1] supports:
  g - global match
  i - ignore case
  m - multiline; treat beginning and end characters (^ and $) as working 
over multiple lines (i.e., match the beginning or end of each line 
(delimited by \n or \r), not only the very beginning or end of the whole 
input string)
  y - sticky; matches only from the index indicated by the lastIndex 
property of this regular expression in the target string (and does not 
attempt to match from any later indexes).

whereas SPARQL supports:

s,m,i,x (see [2])

[1] 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
[2] http://www.w3.org/TR/xpath-functions/#regex-syntax

So I would allow to provide flags as optional arguments, but wouldn't 
enumerate them explicitly.

cheers,
simon

---
DDipl.-Ing. Simon Steyskal
Institute for Information Business, WU Vienna

www: http://www.steyskal.info/  twitter: @simonsteys

Am 2015-07-24 07:02, schrieb RDF Data Shapes Working Group Issue 
Tracker:
> shapes-ISSUE-77 (sh:pattern flags): Shall sh:pattern also support
> sh:flags? [SHACL Spec]
> 
> http://www.w3.org/2014/data-shapes/track/issues/77
> 
> Raised by: Holger Knublauch
> On product: SHACL Spec
> 
> sh:pattern can be implemented in SPARQL using REGEX, which also
> supports an optional flag argument as in
> 
> FILTER regex("Alice", "^ali", "i")
> 
> which will be executed with "ignore case" flag set.
> 
> Should this flag option also be added to SHACL? I am not sure if this
> is consistently supported by all potential execution platforms, yet
> doing things like ignore case is a common requirement in practice.

Received on Friday, 24 July 2015 15:34:07 UTC