{ "id": "61457", "key": "TIMOB-825", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11223", "name": "Release 1.3.0", "archived": true, "released": true, "releaseDate": "2010-05-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:21.000+0000", "created": "2011-04-15T02:37:15.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:21.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

var mystring = \"Add to Address Book\";

\n

// with /i modifier Ti.API.info(mystring.search(/s/i)); // -1\n(incorrect) (string length: odd)
\nTi.API.info(mystring.search(/ss/i)); // 12 (correct) (string\nlength: even)
\nTi.API.info(mystring.search(/ess/i)); // -1 (incorrect) (string\nlength: odd)
\nTi.API.info(mystring.search(/ress/i)); // 10 (correct) (string\nlength: even)
\nTi.API.info(mystring.search(/dress/i)); // -1 (incorrect) (string\nlength: odd)
\nTi.API.info(mystring.search(/ddress/i)); // 8 (correct) (string\nlength: even)
\nTi.API.info(mystring.search(/address/i)); // -1 (incorrect) (string\nlength: odd)
\nTi.API.info(mystring.search(/address /i)); // 7 (correct) (string\nlength: even)

\n

// no modifier Ti.API.info(mystring.search(/address/)); // -1\n(correct) (both cases correct here)
\nTi.API.info(mystring.search(/ddress/)); // 8 (correct)

\n

in this code, any odd numbered search string fails. removing the\n/i (case insensitive) causes them all to work

{html}", "attachment": [], "flagged": false, "summary": "case insensitive search broken (using JS search function)", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124139", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Fixed in a submit to tijscore\n(8ebc51c51514775784f41f1a666919a42912a692).

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:37:16.000+0000", "updated": "2011-04-15T02:37:16.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }