W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

Regular expression: How exclude the last \n character

From: Cams Ismael <Ismael.Cams@siemens.com>
Date: Mon, 24 Mar 2003 15:01:21 +0100
Message-ID: <57FD2C3A246F76438CA6FDAD8FE9F1957ABC68@hrtades7.atea.be>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>

Hello everybody,

what I want to realize with my regular expression is:

<description>bla bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
bla</description>

Every line must maximal be 50 characters long. But I want to avoid an CR is
added to the last line. So I don't want

bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
</description>

The regular expression I have now is:

	((.{0,50}\n){0,})(.{0,50})

But with my editor it's still possible to enter without an error generation
of my validator.
Where am I wrong with my expression ?

Kind regards,
IsmaŽl
Received on Monday, 24 March 2003 09:01:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT