W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2006

[whatwg] alternatives/grouping in pattern attributes in Web Forms

From: <mqmq87@web.de>
Date: Fri, 14 Apr 2006 19:51:57 +0200
Message-ID: <276499098@web.de>
This text in section 2.6 doesn't seem to consider alternatives and grouping:

| Thus, using the ^ character anywhere other than at the start of the pattern,
| or the $ character anywhere other than at the end of the pattern, prevents
| the pattern from matching anything (unless the characters are escaped or
| part of a range).

This is wrong (and what means "range"? should this read "CharacterClass"?).
In pattern="[0-9]+$|^0[xX][0-9a-fA-F]+" they would be even required to prevent
matching "123xyz", "abc0x0" or similar values, unless the whole string is
enclosed in parentheses.

More intuitive would be an implicit enclosure of the attribute value between
"^(?:" and ")$" instead of plain ^ and $ to construct the actual regular


SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
Received on Friday, 14 April 2006 10:51:57 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:46 UTC