W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > October 2010

[Bug 11011] Since Javascript does not support mode specifiers inside the regular expression, there is no simple way of matching a single word case-insensitively besides turning into [Ww][Oo][Rr][Dd]

From: <bugzilla@jessica.w3.org>
Date: Tue, 12 Oct 2010 12:56:31 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1P5eP9-0007MP-Gy@jessica.w3.org>

--- Comment #1 from Vegard Larsen <vegard@xaltra.net> 2010-10-12 12:56:31 UTC ---
A small use case: you wan't to validate a password (simply [A-Za-z0-9]{5,}),
but cannot accept any case-variation of the word "password":

      required />

This becomes tedious very quickly. If mode specifiers were supported in
Javascript regular expressions, one could try:


According to the spec, this should be equivalent to:


This would have worked if Javascript's regular expressions had supported mode
specifiers (it works when parsed as PCRE or a Java or a .NET regex).

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 12 October 2010 12:56:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:31 UTC