W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2004

[whatwg] pattern attribute

From: Super-User <root@www3.itn.co.uk>
Date: Mon, 23 Aug 2004 11:07:53 +0100
Message-ID: <20040823110753.A7537@www3.itn.co.uk>
>>>3. Finally, is it necessary to have an ERROR_ for invalid regexes
> Ian Hickson wrote:
> > No, if the regexp is invalid, it is just ignored.
> This is both a good thing and a bad thing. Ignoring the regexp makes 
> sense, but also makes debugging complex regexps a nightmare. Maybe 
> WHATWG should provide a reference implementation regexp checker and/or 
> debugger for these purposes?
> Thoughts?

I am inclined to agree. I can't see any benefit in silently failing an invalid
regex. I don't think you necessarily need a standard checker / debugger (just
a standard regex!) but you do need to know when a regex is invalid. After all,
this is likely to be a "development time" rather than a "run time" issue, as
it is not dependent on input, so there should be circumstances where throwing
an error is a bad thing.

Received on Monday, 23 August 2004 03:07:53 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:36 UTC