[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]

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11011

--- Comment #8 from Vegard Larsen <vegard@xaltra.net> 2010-10-13 10:44:40 UTC ---
(In reply to comment #7)
> The problem here is that it's very unintuitive to not use the "match entire
> value" policy. [...]If we didn't use the "match enture value" policy, almost 
> everyone would have to write patterns like "^stuff here$", and many would 
> forget leading to bad user experience.

Agreed. How about this allowing both complete AND partial regular expressions? 

* If you provide a complete regular expression, it will not be anchored by 
  default, and you will have to anchor it yourself if you want it. You can also 
  toggle the wanted flags (only /i really makes sense). 

  (We could also automatically anchor even complete regular expressions. 
   Inserting ^(?: and )$ after the starting slash and before the ending slash 
   will not screw up any regexes, even if they are already anchored).

* If you provide a partial regular expression, we default to the anchored, 
  case-sensitive form.

> If we do this then we likely want to make ignore-case the default behavior.
> That is probably more commonly useful.

That would only move the problem to the opposite side of the scale. With
case-insensitivity as the default, you won't be able to demand that a password
has both upper-case and lower-case characters, for instance, and this is a more
apparent issue than lacking the option to do case-insensitive matching.

-- 
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 Wednesday, 13 October 2010 10:44:43 UTC