Hello.
On Sunday 18 July 2010 23:02:06 Chris Browet wrote:
> In the doc, it is described that regexp attribute selection is allowed
> ("way[highway=~/primary/] /* regex */").
> While it is inherently nice, the problem is that there is almost as many
> regexp syntaxes as there are implementations.
> At least, the syntax used should be defined (is the example perl?) but I
> doubt it will be practical to implement a specific syntax for MapCSS in
> every programming language (not even speaking of those not having builtin
> support).
Yes, I agree that simple glob-alike matching should be enough for most needs,
and it would be much faster than using regexps.
> Shouldn't it be wise to remove this from the spec and replace it by simpler
> cardinals ('*', '?' and maybe others)?
How about these rules:
For the two strings to match, their contents must be identical except that the
following special sequences may appear in pattern:
* Matches any sequence of characters in string, including a null string.
? Matches any single character in string.
[chars] Matches any character in the set given by chars. If a sequence of
the form x-y appears in chars, then any character between x and y,
inclusive, will match.
\x Matches the single character x. This provides a way of avoiding
the special interpretation of the characters *?[]\ in pattern.
--
WBR, Andrew
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Mapcss mailing list [email protected] http://lists.openstreetmap.org/listinfo/mapcss
