{"action":"created","issue":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/1430","labels_url":"https://api.github.com/repos/influxdb/influxdb/issues/1430/labels{/name}","comments_url":"https://api.github.com/repos/influxdb/influxdb/issues/1430/comments","events_url":"https://api.github.com/repos/influxdb/influxdb/issues/1430/events","html_url":"https://github.com/influxdb/influxdb/issues/1430","id":55844290,"number":1430,"title":"Add where against a regex to query language","user":{"login":"pauldix","id":4331,"avatar_url":"https://avatars.githubusercontent.com/u/4331?v=3","gravatar_id":"","url":"https://api.github.com/users/pauldix","html_url":"https://github.com/pauldix","followers_url":"https://api.github.com/users/pauldix/followers","following_url":"https://api.github.com/users/pauldix/following{/other_user}","gists_url":"https://api.github.com/users/pauldix/gists{/gist_id}","starred_url":"https://api.github.com/users/pauldix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pauldix/subscriptions","organizations_url":"https://api.github.com/users/pauldix/orgs","repos_url":"https://api.github.com/users/pauldix/repos","events_url":"https://api.github.com/users/pauldix/events{/privacy}","received_events_url":"https://api.github.com/users/pauldix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/influxdb/influxdb/labels/2%20-%20Working","name":"2 - Working","color":"CCCCCC"}],"state":"open","locked":false,"assignee":{"login":"dgnorton","id":209347,"avatar_url":"https://avatars.githubusercontent.com/u/209347?v=3","gravatar_id":"","url":"https://api.github.com/users/dgnorton","html_url":"https://github.com/dgnorton","followers_url":"https://api.github.com/users/dgnorton/followers","following_url":"https://api.github.com/users/dgnorton/following{/other_user}","gists_url":"https://api.github.com/users/dgnorton/gists{/gist_id}","starred_url":"https://api.github.com/users/dgnorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgnorton/subscriptions","organizations_url":"https://api.github.com/users/dgnorton/orgs","repos_url":"https://api.github.com/users/dgnorton/repos","events_url":"https://api.github.com/users/dgnorton/events{/privacy}","received_events_url":"https://api.github.com/users/dgnorton/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-01-29T01:45:27Z","updated_at":"2015-02-09T18:46:01Z","closed_at":null,"body":"The query language needs to support queries like this:\n\n```sql\nSELECT mean(value)\nFROM cpu\nWHERE host =~ /some regex/\nGROUP BY time(5m)\n\n-- and the inverse\nSELECT mean(value)\nFROM cpu\nWHERE host !~ /some regex/\nGROUP BY time(5m)\n\n-- or ignore case\nSELECT mean(value)\nFROM cpu\nWHERE host =~ /some regex/i\nGROUP BY time(5m)\n```\n\nUpdate the query language to be able to handle this and parse the regex"},"comment":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/comments/73565100","html_url":"https://github.com/influxdb/influxdb/issues/1430#issuecomment-73565100","issue_url":"https://api.github.com/repos/influxdb/influxdb/issues/1430","id":73565100,"user":{"login":"dgnorton","id":209347,"avatar_url":"https://avatars.githubusercontent.com/u/209347?v=3","gravatar_id":"","url":"https://api.github.com/users/dgnorton","html_url":"https://github.com/dgnorton","followers_url":"https://api.github.com/users/dgnorton/followers","following_url":"https://api.github.com/users/dgnorton/following{/other_user}","gists_url":"https://api.github.com/users/dgnorton/gists{/gist_id}","starred_url":"https://api.github.com/users/dgnorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgnorton/subscriptions","organizations_url":"https://api.github.com/users/dgnorton/orgs","repos_url":"https://api.github.com/users/dgnorton/repos","events_url":"https://api.github.com/users/dgnorton/events{/privacy}","received_events_url":"https://api.github.com/users/dgnorton/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T18:46:01Z","updated_at":"2015-02-09T18:46:01Z","body":"@benbjohnson @pauldix \r\n\r\n- https://github.com/influxdb/influxdb/blob/master/influxql/token.go#L39  comment says `!=` but scanner looks for `<>`.  Which is correct?\r\n\r\n- If `<>` is correct, do we want to use `<>~` for regexp?  Feels awkward to me.\r\n\r\n- Would it be better to make the regexp a string like `WHERE host =~ 'some regex'` instead of using the '/' delimiters?\r\n\r\n- For the insensitive flag, can we just let that be handled by Go's regexp syntax?  e.g., `WHERE host =~ '(?i)rest of regexp'`  https://code.google.com/p/re2/wiki/Syntax"}}