This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: https://html.spec.whatwg.org/multipage/forms.html Multipage: https://html.spec.whatwg.org/multipage/#the-pattern-attribute Complete: https://html.spec.whatwg.org/#the-pattern-attribute Referrer: https://www.google.com/ Comment: Opt-in to the ES6 `u` flag for regular expressions? Posted from: 176.219.173.4 User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.58 Safari/537.36 OPR/25.0.1614.18 (Edition beta)
ES6 introduces the `u` flag for regular expressions, which makes their behavior much more sensible and Unicode-friendly. It would be nice to enable this flag for the `pattern` attribute. Backwards compatibility is a concern (I’ve documented some differences in behavior here: https://mathiasbynens.be/notes/es6-unicode-regex) so we might need a new opt-in switch.
Isn't there an inline opt-in like in Perl? (e.g. so you can have subregions that are case-insensitive and subregions that aren't?)
Use counter for pattern: http://www.chromestatus.com/metrics/feature/timeline/popularity/44 Earlier discussion about `i`: https://www.w3.org/Bugs/Public/show_bug.cgi?id=11011
I think if we have to have an out-of-band opt-in, this is a non-starter. However, if we can just turn this on always, it would make a lot of sense. I've gone ahead and made "u" be specified always. Hopefully this is Web-compatible. The biggest risk is with inappropriate escapes (as in pattern="\a").