[whatwg] Web Forms 2.0 Substantial - Section 2
malcolm-what at farside.org.uk
Tue Jun 22 13:27:03 PDT 2004
> hehehe. What is the empty string supposed to do if you use it as a
> regex pattern in ECMA?
Per ECMA-262 18.104.22.168 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.
More information about the whatwg