{"action":"opened","issue":{"url":"https://api.github.com/repos/brython-dev/brython/issues/116","labels_url":"https://api.github.com/repos/brython-dev/brython/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/brython-dev/brython/issues/116/comments","events_url":"https://api.github.com/repos/brython-dev/brython/issues/116/events","html_url":"https://github.com/brython-dev/brython/issues/116","id":55411713,"number":116,"title":"The re module","user":{"login":"JamesHutchison","id":6948206,"avatar_url":"https://avatars.githubusercontent.com/u/6948206?v=3","gravatar_id":"","url":"https://api.github.com/users/JamesHutchison","html_url":"https://github.com/JamesHutchison","followers_url":"https://api.github.com/users/JamesHutchison/followers","following_url":"https://api.github.com/users/JamesHutchison/following{/other_user}","gists_url":"https://api.github.com/users/JamesHutchison/gists{/gist_id}","starred_url":"https://api.github.com/users/JamesHutchison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamesHutchison/subscriptions","organizations_url":"https://api.github.com/users/JamesHutchison/orgs","repos_url":"https://api.github.com/users/JamesHutchison/repos","events_url":"https://api.github.com/users/JamesHutchison/events{/privacy}","received_events_url":"https://api.github.com/users/JamesHutchison/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-25T11:39:13Z","updated_at":"2015-01-25T11:39:13Z","closed_at":null,"body":"The re module is a real pain. It takes over a second to load on a local machine and most of the utility of having a Python RegEx engine over a javascript RegEx engine is usually non-existent besides familiarity. I've tried making a JSON object after the file is processed and the file is just enormous.\r\n\r\nWe could add a RegExp class to the javascript module. This could be a nice wrapper for the javascript regex engine that automatically converts to python lists and such. As a short term solution, I don't see any reason not to do this. We could also have a second class that matches the python regex interface, although I can't decide what it would be named or what module it would live in.\r\n\r\nWe could also replace the existing python implementation with an asm.js compiled version from the original python C code. I have no idea if this could work, or how you would go about it, but the site regex101.com appears to be using an asm.js compiled pcre library for their python matching and it's blazing fast.\r\n"}}