WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 7253
Bug 10611
Test of regular expression always yields false
https://bugs.webkit.org/show_bug.cgi?id=10611
Summary
Test of regular expression always yields false
Mark Malone
Reported
2006-08-28 15:23:11 PDT
Given: function isRestrictedText(s) { var filter = /^[\w!#$,;=@_`~\-\^\'\.\{\}\[\]\(\)\u00C0-\uFFFF]( ?[\w!#$,;=@_`~\-\^\'\.\{\}\[\]\(\)\u00C0-\uFFFF])*$/; alert(filter.test(s)); } Legal and non-legal input values alert false.
Attachments
Test Case
(860 bytes, text/html)
2006-08-28 15:24 PDT
,
Mark Malone
no flags
Details
Test Case
(869 bytes, text/html)
2006-08-28 15:32 PDT
,
Mark Malone
no flags
Details
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Mark Malone
Comment 1
2006-08-28 15:24:22 PDT
Created
attachment 10287
[details]
Test Case
Mark Malone
Comment 2
2006-08-28 15:25:00 PDT
rdar://4694011
Mark Malone
Comment 3
2006-08-28 15:32:32 PDT
Created
attachment 10288
[details]
Test Case Attached Test Case
Alexey Proskuryakov
Comment 4
2006-08-28 21:50:09 PDT
Workaround: var filter = new RegExp("^[\\w!#$,;=@_`~\\-\\^\\'\\.\\{\\}\[\\]\\(\\)\u00C0-\uFFFF]( ?[\\w!#$,;=@_`~\\-\\^\\'\\.\\{\\}\\[\\]\\(\\)\u00C0-\uFFFF])*$"); *** This bug has been marked as a duplicate of
7253
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug