{"action":"created","issue":{"url":"https://api.github.com/repos/benjamingr/RegExp.escape/issues/33","labels_url":"https://api.github.com/repos/benjamingr/RegExp.escape/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/benjamingr/RegExp.escape/issues/33/comments","events_url":"https://api.github.com/repos/benjamingr/RegExp.escape/issues/33/events","html_url":"https://github.com/benjamingr/RegExp.escape/issues/33","id":92787637,"number":33,"title":"Alternate proposal: RegExp.fromString","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-03T04:22:36Z","updated_at":"2015-07-03T05:25:55Z","closed_at":null,"body":"Instead of `new RegExp(RegExp.escape(s))`, you do `RegExp.fromString(s)`.\r\n\r\nPros:\r\n\r\n- Shorter\r\n- Escaping is simpler since we don't worry about cases like `new RegExp(s1 + RegExp.escape(s2) + s3)`\r\n\r\nCons:\r\n\r\n- Maybe doesn't meet some important use cases?\r\n- Do other languages do this? They all do escape..."},"comment":{"url":"https://api.github.com/repos/benjamingr/RegExp.escape/issues/comments/118239873","html_url":"https://github.com/benjamingr/RegExp.escape/issues/33#issuecomment-118239873","issue_url":"https://api.github.com/repos/benjamingr/RegExp.escape/issues/33","id":118239873,"user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"created_at":"2015-07-03T05:25:55Z","updated_at":"2015-07-03T05:25:55Z","body":"Yep. The question is, what are the use cases involving concatenation, and does RegExp.escape properly meet them anyway? A lot of the discussion about the escape set seems focused around dubiously-valuable concatenation use cases."}}