[whatwg] pattern attribute

I have a couple of questions about the pattern attribute (apologies if
this has been discussed at length already - couldn't find anything in
the list archive).

1. What is the motivation behind the implicit ^ and $ (start and end of
string metacharacters)? I appreciate that in a lot of cases it makes it
easier for people to implicitly match the whole string, but (as is
mentioned in a sidebar) it make it potentially much more complex for
people who want to match substrings (especially where newlines are
possible). Would it be better just to comply with the ECMA-262 spec?

2. Also (not wishing to compicate things too much!) did you consider
supporting regex modifiers (I guess case insensitivity would be
particularly useful)?

3. Finally, is it necessary to have an ERROR_ for invalid regexes

I guess the real point of 1 is consistency, and the expectation that the
input control will do what you expect. For example - I would expect that
if I already have a validator implemented in javascript, I should be
able to use the same regex pattern that I am using to validate an imput
field in the script.

Ave.

Ave Wrigley
Head of New Media Technology, ITN
200 Grays Inn Rd, Tel: +44-20-7430-4719
London WC1X 8XZ,  Mob: +44-7713-986247
United Kingdom    Fax: +44-20-7430-4020
mailto:ave.wrigley at itn.co.uk
mailto:ave.wrigley at ave.wrigley.name
This email (and any attachments) is intended solely for the individual(s) to whom addressed. It may contain confidential and/or legally privileged information. Any statement or opinions therein are not necessarily those of ITN unless specifically stated. Any unauthorised use, disclosure or copying is prohibited. If you have received this email in error, please notify the sender and delete it from your system. Security and reliability of the e-mail and attachments are not guaranteed. You must take full responsibility for virus checking.



Independent Television News Limited, 

Registered No. 548648 England,

VAT Reg. No: GB 756 2995 81, 

200 Gray's Inn Road, London WC1X 8XZ,

Telephone: 020 7833 3000.

Received on Thursday, 22 July 2004 03:01:28 UTC