- From: Yves Savourel <ysavourel@enlaso.com>
- Date: Wed, 10 Oct 2012 06:25:18 -0600
- To: <public-multilingualweb-lt@w3.org>
>> Could we then use ".[\n\r]" for "any characters?
>
> We can't use .[\n\r] as it is not valid class.
Duh... How did I missed that.
> What we can do is to redefine "." as matching any
> character including \n and \r. This should not pose
> any harm to implementors as RE libraries usually had
> flag which controls whether \n and \r are covered by .
> (whole string matching, and line-by-line matching).
> I think this could be the easiest and cleanest solution
> both from the spec and implementation PoV.
I think it's a good idea. But it seems a bit "un-formal" as there seems to be nothing in http://www.w3.org/TR/xmlschema-2/#regexs that requires implementations to have such flag. So there is no guaranty that . can be used like that.
Another option would be to use a range with all Unicode characters, but obviously we can't either because we can't specify the lower bound as it would be an invalid XML character.
So I think your solution ("." + a bit about . including \r\n) is the best Jirka.
Cheers,
-ys
Received on Wednesday, 10 October 2012 12:25:55 UTC