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

[whatwg] Re: Various attributes

From: Malcolm Rowe <malcolm-what@farside.org.uk>
Date: Wed, 16 Jun 2004 18:57:38 +0100
Message-ID: <courier.40D08A12.00005495@mail.farside.org.uk>
Jim Ley writes:
>> > Why require the ^ and $ in the regexp, what's the point in the
>> > restriction?
>> They are not required; they are implied. The reason is that otherwise
>> authors would almost always have to add them, which would be the source
>> of much confusion.
> I disagree, there's many times where I've been happy with matching a
> regexp in validation that didn't include the begin and end, and
> because they are implied, there's no way to not have them, meaning
> we'd have to have much more complicated regexps.

I disagree - pattern="[0-9]{4}" is significantly more common than something 
like pattern=".*foo.*", and seriously, how much extra work was the latter? 

Regards,
Malcolm
Received on Wednesday, 16 June 2004 10:57:38 UTC

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