Re: Platform-indendent way of specifying line separator?

Hi Roger,

> What regex (or Unicode symbol) is used to specify "line separator"?
> The regex (or Unicode symbol) must work regardless of the platform.

When an XML document is parsed, all "line separators" are converted to
a single newline character (#xA). (Well, almost all line separators;
in XML 1.0, the #x85 and #x2028 characters aren't, but in XML 1.1 they
are.) See http://www.w3.org/TR/REC-xml#sec-line-ends.

So it should be that:

  <pattern value="[a-zA-Z0-9]*\n" />

will do the trick, unless you want to account for the more obscure
platforms...

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Friday, 5 September 2003 05:59:53 UTC