[whatwg] Re: Various attributes

Malcolm Rowe malcolm-what at farside.org.uk
Wed Jun 16 10:57:38 PDT 2004


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



More information about the whatwg mailing list