{"action":"created","issue":{"url":"https://api.github.com/repos/remram44/regex-cheatsheet/issues/18","repository_url":"https://api.github.com/repos/remram44/regex-cheatsheet","labels_url":"https://api.github.com/repos/remram44/regex-cheatsheet/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/remram44/regex-cheatsheet/issues/18/comments","events_url":"https://api.github.com/repos/remram44/regex-cheatsheet/issues/18/events","html_url":"https://github.com/remram44/regex-cheatsheet/issues/18","id":350569660,"node_id":"MDU6SXNzdWUzNTA1Njk2NjA=","number":18,"title":"What did you mean by 'don't give back on backtrack'?","user":{"login":"Agarwal-Nikhil","id":18417820,"node_id":"MDQ6VXNlcjE4NDE3ODIw","avatar_url":"https://avatars2.githubusercontent.com/u/18417820?v=4","gravatar_id":"","url":"https://api.github.com/users/Agarwal-Nikhil","html_url":"https://github.com/Agarwal-Nikhil","followers_url":"https://api.github.com/users/Agarwal-Nikhil/followers","following_url":"https://api.github.com/users/Agarwal-Nikhil/following{/other_user}","gists_url":"https://api.github.com/users/Agarwal-Nikhil/gists{/gist_id}","starred_url":"https://api.github.com/users/Agarwal-Nikhil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Agarwal-Nikhil/subscriptions","organizations_url":"https://api.github.com/users/Agarwal-Nikhil/orgs","repos_url":"https://api.github.com/users/Agarwal-Nikhil/repos","events_url":"https://api.github.com/users/Agarwal-Nikhil/events{/privacy}","received_events_url":"https://api.github.com/users/Agarwal-Nikhil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-14T19:39:58Z","updated_at":"2018-08-14T23:57:13Z","closed_at":null,"author_association":"NONE","body":"Could you please give an example of this?"},"comment":{"url":"https://api.github.com/repos/remram44/regex-cheatsheet/issues/comments/413052604","html_url":"https://github.com/remram44/regex-cheatsheet/issues/18#issuecomment-413052604","issue_url":"https://api.github.com/repos/remram44/regex-cheatsheet/issues/18","id":413052604,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzA1MjYwNA==","user":{"login":"remram44","id":426784,"node_id":"MDQ6VXNlcjQyNjc4NA==","avatar_url":"https://avatars3.githubusercontent.com/u/426784?v=4","gravatar_id":"","url":"https://api.github.com/users/remram44","html_url":"https://github.com/remram44","followers_url":"https://api.github.com/users/remram44/followers","following_url":"https://api.github.com/users/remram44/following{/other_user}","gists_url":"https://api.github.com/users/remram44/gists{/gist_id}","starred_url":"https://api.github.com/users/remram44/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remram44/subscriptions","organizations_url":"https://api.github.com/users/remram44/orgs","repos_url":"https://api.github.com/users/remram44/repos","events_url":"https://api.github.com/users/remram44/events{/privacy}","received_events_url":"https://api.github.com/users/remram44/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T23:57:13Z","updated_at":"2018-08-14T23:57:13Z","author_association":"OWNER","body":"A regex is matched left-to-right. Each group (by default) eats as many characters as it can, and then the next group tries to match from where we left off. If this doesn't work, a backtrack occurs, where the regex engine will try a smaller match for the first group and try the second group again.\r\n\r\nIn some cases, this might not be wanted. It is mostly an optimization: you know no match will happen, and you don't want the engine to waste its time trying every other possibility.\r\n\r\nSimple example of what this does:\r\n`(a+)(ab)` will match the string `aaab` (the captured groups are `aa` and `ab`)\r\n`(a++)(ab)` will not match the string `aaab`, because the engine will match the first group `(a++)` to `aaa`, will not be able to match `(ab)` to `b`, and the first group will not \"give back\" a character `a` on backtrack."}}
{"actor":{"display_login":"remram44"}}