- From: Super-User <root@www3.itn.co.uk>
- Date: Mon, 23 Aug 2004 11:07:53 +0100
>>>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. Ave.
Received on Monday, 23 August 2004 03:07:53 UTC