{"action":"closed","issue":{"url":"https://api.github.com/repos/jashkenas/coffeescript/issues/3898","labels_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/3898/labels{/name}","comments_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/3898/comments","events_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/3898/events","html_url":"https://github.com/jashkenas/coffeescript/issues/3898","id":61393489,"number":3898,"title":"inline regex and split","user":{"login":"dcsan","id":514002,"avatar_url":"https://avatars.githubusercontent.com/u/514002?v=3","gravatar_id":"","url":"https://api.github.com/users/dcsan","html_url":"https://github.com/dcsan","followers_url":"https://api.github.com/users/dcsan/followers","following_url":"https://api.github.com/users/dcsan/following{/other_user}","gists_url":"https://api.github.com/users/dcsan/gists{/gist_id}","starred_url":"https://api.github.com/users/dcsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcsan/subscriptions","organizations_url":"https://api.github.com/users/dcsan/orgs","repos_url":"https://api.github.com/users/dcsan/repos","events_url":"https://api.github.com/users/dcsan/events{/privacy}","received_events_url":"https://api.github.com/users/dcsan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-14T03:57:25Z","updated_at":"2015-03-15T20:10:20Z","closed_at":"2015-03-15T20:10:20Z","body":"there seems to be a bug when you use split() and a regex with spaces in it.\r\n\r\n```coffee\r\n    opts = str.split(/OR/i)     # ok\r\n    opts = str.split(/ OR /i)   # not ok\r\n\r\n```\r\n\r\nwith no spaces its OK:\r\n![image](https://cloud.githubusercontent.com/assets/514002/6650213/380e8138-c9c3-11e4-90d0-23cf6d9e4820.png)\r\n\r\nmy CS linter doesn't like it for the same reason i guess.\r\n![image](https://cloud.githubusercontent.com/assets/514002/6650214/44801864-c9c3-11e4-8e44-a5cb56734e2e.png)\r\n\r\nalso using embedded JS it works fine.\r\n\r\n    `opts = str.split(/ or /i)`\r\n\r\n"}}