W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2006

[whatwg] Web Forms: pattern attribute

From: Dean Edwards <dean@edwards.name>
Date: Tue, 04 Apr 2006 00:33:05 +0100
Message-ID: <4431B0B1.5070902@edwards.name>
Michel Fortin wrote:
> Something about the pattern attribute in Web Forms got me thinking:
>> The regular expression language used for this attribute is the same as 
>> that defined in [ECMA262], except that the pattern attribute implies a 
>> ^ at the start of the pattern and a $ at the end (so the pattern must 
>> match the entire value, not just any subset).
> Does that mean that a pattern attribute like "foo|bar" should translate 
> to /^foo|bar$/ ? Wouldn't it make more sense it it was /^(foo|bar)$/ 
> with the parentesis?

You have a point. Would implied parentheses cause any side effects? None 
that I can think of...

Received on Monday, 3 April 2006 16:33:05 UTC

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