- From: Malcolm Rowe <malcolm-what@farside.org.uk>
- Date: Wed, 16 Jun 2004 18:57:38 +0100
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