[whatwg] "pattern" attribute definition

Ian Hickson ian at hixie.ch
Sat Aug 21 05:08:01 PDT 2004

On Thu, 22 Jul 2004, Malcolm Rowe wrote:
> When we define 'pattern', we define it in terms of an ECMAScript RegExp 
> object (or so it seems), but we don't define what the values of the 
> 'ignoreCase' and 'multiline' properties of a hypothetical object should 
> be.

Yeah, I was assuming that they would just use their default values. I've 
changed the spec now so that they are defined.

> Secondly, is '/' special inside an expression? In a 'normal' regexp (in
> ECMAScript or perl), you'd expect to have to escape it, since the language
> uses that symbol to terminate the pattern definition - though in perl, you
> could also use another character if you wanted to, for example: m|^/etc/|. 

Even in JS, if you use the string form for the constructor, they are not 
magical, IIRC.

> Would we expect 'pattern="/etc/.*" to work? Would 'pattern="\/etc\/.*" work
> just as well? Should we include a note around that area in the definition of
> 'pattern'? 


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

More information about the whatwg mailing list