{"action":"created","issue":{"url":"https://api.github.com/repos/firasdib/Regex101/issues/1072","repository_url":"https://api.github.com/repos/firasdib/Regex101","labels_url":"https://api.github.com/repos/firasdib/Regex101/issues/1072/labels{/name}","comments_url":"https://api.github.com/repos/firasdib/Regex101/issues/1072/comments","events_url":"https://api.github.com/repos/firasdib/Regex101/issues/1072/events","html_url":"https://github.com/firasdib/Regex101/issues/1072","id":389692094,"node_id":"MDU6SXNzdWUzODk2OTIwOTQ=","number":1072,"title":"PHP 7.3's PRCE2 error on invalid character range not reflected in explanation (previously downgraded to literal)","user":{"login":"GreenReaper","id":383043,"node_id":"MDQ6VXNlcjM4MzA0Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/383043?v=4","gravatar_id":"","url":"https://api.github.com/users/GreenReaper","html_url":"https://github.com/GreenReaper","followers_url":"https://api.github.com/users/GreenReaper/followers","following_url":"https://api.github.com/users/GreenReaper/following{/other_user}","gists_url":"https://api.github.com/users/GreenReaper/gists{/gist_id}","starred_url":"https://api.github.com/users/GreenReaper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreenReaper/subscriptions","organizations_url":"https://api.github.com/users/GreenReaper/orgs","repos_url":"https://api.github.com/users/GreenReaper/repos","events_url":"https://api.github.com/users/GreenReaper/events{/privacy}","received_events_url":"https://api.github.com/users/GreenReaper/received_events","type":"User","site_admin":false},"labels":[{"id":95501546,"node_id":"MDU6TGFiZWw5NTUwMTU0Ng==","url":"https://api.github.com/repos/firasdib/Regex101/labels/bug","name":"bug","color":"e11d21","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-12-11T10:24:44Z","updated_at":"2018-12-25T17:47:55Z","closed_at":null,"author_association":"NONE","body":"## Bug Description\r\nPHP 7.3 uses PCRE2. This causes compilation to fail where previously an invalid character range would be ignored and treated as a literal instead. This is not reflected by the tester, which lists itself as \"pcre (php)\".\r\n\r\nI appreciate that PCRE is not PCRE2; however, this distinction may not be clearly understood by all users.\r\n\r\n### Reproduction steps\r\nSelect \"pcre (php)\"\r\nUse `[^\\w-_]+` as the regular expression.\r\n\r\n### Expected Outcome\r\nIn the explanation, a notice that under certain versions of PHP there might be an issue, similar to:\r\n\r\n> All the errors detected are listed below, from left to right, as they appear in the pattern.\r\n> - You can not create a range with a shorthand escape sequences\r\n\r\n[although this should probably be without the \"a\", or the last \"s\" - this is the current \"python\" output]\r\n\r\n### Actual outcome\r\n\r\n> Match a single character not present in the list below [^\\w-_]+\r\n> + Quantifier — Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)\r\n> \\w matches any word character (equal to [a-zA-Z0-9_])\r\n> -_ matches a single character in the list -_ (case insensitive)\r\n> Global pattern flags\r\n> i modifier: insensitive. Case insensitive match (ignores case of [a-zA-Z])\r\n\r\n---\r\nThis is somewhat similar to #590 except that it's not an escaped character but \\w means \"any word character\", so it simply doesn't make sense as a range."},"comment":{"url":"https://api.github.com/repos/firasdib/Regex101/issues/comments/449865251","html_url":"https://github.com/firasdib/Regex101/issues/1072#issuecomment-449865251","issue_url":"https://api.github.com/repos/firasdib/Regex101/issues/1072","id":449865251,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTg2NTI1MQ==","user":{"login":"GreenReaper","id":383043,"node_id":"MDQ6VXNlcjM4MzA0Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/383043?v=4","gravatar_id":"","url":"https://api.github.com/users/GreenReaper","html_url":"https://github.com/GreenReaper","followers_url":"https://api.github.com/users/GreenReaper/followers","following_url":"https://api.github.com/users/GreenReaper/following{/other_user}","gists_url":"https://api.github.com/users/GreenReaper/gists{/gist_id}","starred_url":"https://api.github.com/users/GreenReaper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreenReaper/subscriptions","organizations_url":"https://api.github.com/users/GreenReaper/orgs","repos_url":"https://api.github.com/users/GreenReaper/repos","events_url":"https://api.github.com/users/GreenReaper/events{/privacy}","received_events_url":"https://api.github.com/users/GreenReaper/received_events","type":"User","site_admin":false},"created_at":"2018-12-25T17:47:55Z","updated_at":"2018-12-25T17:47:55Z","author_association":"NONE","body":"The trouble is that this regex _is_ valid in PCRE[1], just not in PRCR2. I guess it might be possible to warn of the difference in behaviour in this specific circumstance, and any others - if they are not too numerous?\r\n\r\nThis particular difference has tripped several people up judging by the PHP bug reports."}}
{"actor":{"display_login":"GreenReaper"}}