[whatwg] Re: pattern attribute

Malcolm Rowe malcolm-what at farside.org.uk
Thu Jul 22 09:55:06 PDT 2004

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. 


More information about the whatwg mailing list