[whatwg] Re: pattern attribute

Wrigley, Ave writes:
> Incidentally - do you have any views on regex modifiers?

Hmm, good question. ECMAScript defines only the RegExp object's 'ignoreCase' 
and 'multiline' as modifiers, from what I can see. Of those, the only one 
that's really relevant, I think, is ignoreCase. It certainly might be useful 
to be able to define whether a pattern is case-insensitive or not. 

We used to have a comment that defined the value for the 'multiline' 
ECMAScript property, though that seems not to be present in the current 
draft - I'm not sure why. 

I'm not aware of any other modifiers that would make sense in a 'pattern' 
attribute - can you think of any? 

Anyway, it certainly might be useful to set ignoreCase, and I'd guess that 
the default should be defined so that it is case-insensitive. I can't think 
of any obvious syntax for doing that, though. I must admit that I can't 
think of a use case where the pattern *is* case sensitive. 

Regards,
Malcolm

Received on Thursday, 22 July 2004 09:55:06 UTC