[whatwg] Vagueness in description of pattern attribute

On Tue, 14 Dec 2004, Brad Fults wrote:
>
> In the WF 2.0 CFC [1], the pattern attribute is described and included
> is this paragraph:
> 
> "The ^ and $ characters have their usual meaning. Thus, using the ^
> character anywhere other than at the start of the pattern, or the $
> character anywhere other than at the end of the pattern, prevents the
> pattern from matching anything."
> 
> That is obviously untrue in at least four cases.
> 
>  1. When ^ is used at the beginning of a char class. e.g. pattern="[^abc]"
>  2. When ^ is used anywhere else in a char class. e.g. pattern="[asdf^!]"
>  3. When ^ is escaped by \. e.g. pattern="\^.*"
>  4. When $ is escaped by \. e.g. pattern="\$.*"

Good point. Added a parenthetical to that effect.

 
> In addition, following my understanding, the ^ and $ are implied and 
> thus including ^ at the beginning or $ at the end would be erroneous.

My understanding is that /^^^foo$$$/ is the same as /^foo$/ -- they are 
equivalent and match the same thing. Is this incorrect?


Thanks for your input,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 16 December 2004 14:42:35 UTC