- From: Malcolm Rowe <malcolm-what@farside.org.uk>
- Date: Tue, 22 Jun 2004 21:27:03 +0100
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