{"action":"created","issue":{"url":"https://api.github.com/repos/mrRachar/PyPMEWS/issues/3","labels_url":"https://api.github.com/repos/mrRachar/PyPMEWS/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/mrRachar/PyPMEWS/issues/3/comments","events_url":"https://api.github.com/repos/mrRachar/PyPMEWS/issues/3/events","html_url":"https://github.com/mrRachar/PyPMEWS/issues/3","id":123166991,"number":3,"title":"Regex in Expression Parsing","user":{"login":"mrRachar","id":14278663,"avatar_url":"https://avatars.githubusercontent.com/u/14278663?v=3","gravatar_id":"","url":"https://api.github.com/users/mrRachar","html_url":"https://github.com/mrRachar","followers_url":"https://api.github.com/users/mrRachar/followers","following_url":"https://api.github.com/users/mrRachar/following{/other_user}","gists_url":"https://api.github.com/users/mrRachar/gists{/gist_id}","starred_url":"https://api.github.com/users/mrRachar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrRachar/subscriptions","organizations_url":"https://api.github.com/users/mrRachar/orgs","repos_url":"https://api.github.com/users/mrRachar/repos","events_url":"https://api.github.com/users/mrRachar/events{/privacy}","received_events_url":"https://api.github.com/users/mrRachar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mrRachar/PyPMEWS/labels/codefix","name":"codefix","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"mrRachar","id":14278663,"avatar_url":"https://avatars.githubusercontent.com/u/14278663?v=3","gravatar_id":"","url":"https://api.github.com/users/mrRachar","html_url":"https://github.com/mrRachar","followers_url":"https://api.github.com/users/mrRachar/followers","following_url":"https://api.github.com/users/mrRachar/following{/other_user}","gists_url":"https://api.github.com/users/mrRachar/gists{/gist_id}","starred_url":"https://api.github.com/users/mrRachar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrRachar/subscriptions","organizations_url":"https://api.github.com/users/mrRachar/orgs","repos_url":"https://api.github.com/users/mrRachar/repos","events_url":"https://api.github.com/users/mrRachar/events{/privacy}","received_events_url":"https://api.github.com/users/mrRachar/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-12-20T15:25:55Z","updated_at":"2015-12-20T18:49:17Z","closed_at":"2015-12-20T18:49:17Z","body":"In the expression parsing *parsing.py* file, there is still one case of regexes being used to break down the expression into the tree, in working out the capture group. This mightn't cause any actual problems, neither will it slow the programme down, and it doesn't mean it actually uses regexes for matching, but this last refuge of the `re` module should be ridden of. The culprit:\r\n\r\n```\r\nelif letter in '(':\r\n    startoffset, closeoffset = index + 1, cls.findbalanced(\"(\", \")\", expr[index + 1:])\r\n    group = Tree()\r\n    node <<= group\r\n    node = group.tree\r\n    if re.match(r\"[A-Za-z][A-Za-z0-9]*(?:\\[\\])?\\:\", expr[startoffset:index + closeoffset.start]):\r\n        capture = re.match(r\"([A-Za-z][A-Za-z0-9]*(?:\\[\\])?)\\:\", expr[startoffset:index + closeoffset.start])\r\n        startoffset += capture.end()\r\n        group.name = capture.group(1)\r\n```"},"comment":{"url":"https://api.github.com/repos/mrRachar/PyPMEWS/issues/comments/166146777","html_url":"https://github.com/mrRachar/PyPMEWS/issues/3#issuecomment-166146777","issue_url":"https://api.github.com/repos/mrRachar/PyPMEWS/issues/3","id":166146777,"user":{"login":"mrRachar","id":14278663,"avatar_url":"https://avatars.githubusercontent.com/u/14278663?v=3","gravatar_id":"","url":"https://api.github.com/users/mrRachar","html_url":"https://github.com/mrRachar","followers_url":"https://api.github.com/users/mrRachar/followers","following_url":"https://api.github.com/users/mrRachar/following{/other_user}","gists_url":"https://api.github.com/users/mrRachar/gists{/gist_id}","starred_url":"https://api.github.com/users/mrRachar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrRachar/subscriptions","organizations_url":"https://api.github.com/users/mrRachar/orgs","repos_url":"https://api.github.com/users/mrRachar/repos","events_url":"https://api.github.com/users/mrRachar/events{/privacy}","received_events_url":"https://api.github.com/users/mrRachar/received_events","type":"User","site_admin":false},"created_at":"2015-12-20T18:49:17Z","updated_at":"2015-12-20T18:49:17Z","body":"Just removed, now uses new function. Last refuge of re gone!"}}