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

[whatwg] Web Forms 2.0 Substantial - Section 2

From: Malcolm Rowe <malcolm-what@farside.org.uk>
Date: Tue, 22 Jun 2004 21:27:03 +0100
Message-ID: <40D89617.6040009@farside.org.uk>
fantasai wrote:
> hehehe. What is the empty string supposed to do if you use it as a
> regex pattern in ECMA?

Per ECMA-262 15.10.2.2 et seq, you're right, I think; an empty regexp 
matches any string.

 > http://www.jacobsm.com/regexp.htm seems to say "match anything", so
 > you could define the empty string as being the pattern "" without the
 > ^$ bit.

Note that, in contrast, the production '^$' matches only *empty* inputs. 
What do we want pattern="" to mean - match empty inputs, or match any 
input? I'd tend to the former.

Regards,
Malcolm
Received on Tuesday, 22 June 2004 13:27:03 UTC

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