[whatwg] Web Forms 2.0 Substantial - Section 2
Malcolm Rowe
malcolm-what at farside.org.uk
Tue Jun 22 13:27:03 PDT 2004
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
More information about the whatwg
mailing list