{ "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)
// no modifier Ti.API.info(mystring.search(/address/)); // -1\n(correct) (both cases correct here)
\nTi.API.info(mystring.search(/ddress/)); // 8 (correct)
in this code, any odd numbered search string fails. removing the\n/i (case insensitive) causes them all to work
Fixed in a submit to tijscore\n(8ebc51c51514775784f41f1a666919a42912a692).