Is there a way to apply regex modifiers for HTML5 input's pattern-attribute?
问题 There is this snippet from the HTML specification, but either I do not understand the specification or it does not exactly say anything too informative regarding the regex-modifiers. 回答1: You should check this HTML5 pattern attribute documentation: If an input element has a pattern attribute specified, and the attribute's value, when compiled as a JavaScript regular expression with the global , ignoreCase , and multiline flags disabled (see ECMA262 Edition 5, sections 15.10.7.2 through 15.10