{"action":"created","issue":{"url":"https://api.github.com/repos/azoner/pyx12/issues/43","repository_url":"https://api.github.com/repos/azoner/pyx12","labels_url":"https://api.github.com/repos/azoner/pyx12/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/azoner/pyx12/issues/43/comments","events_url":"https://api.github.com/repos/azoner/pyx12/issues/43/events","html_url":"https://github.com/azoner/pyx12/issues/43","id":139097273,"number":43,"title":"Regexes in Validation are wrong.","user":{"login":"statusquo69","id":4974673,"avatar_url":"https://avatars.githubusercontent.com/u/4974673?v=3","gravatar_id":"","url":"https://api.github.com/users/statusquo69","html_url":"https://github.com/statusquo69","followers_url":"https://api.github.com/users/statusquo69/followers","following_url":"https://api.github.com/users/statusquo69/following{/other_user}","gists_url":"https://api.github.com/users/statusquo69/gists{/gist_id}","starred_url":"https://api.github.com/users/statusquo69/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/statusquo69/subscriptions","organizations_url":"https://api.github.com/users/statusquo69/orgs","repos_url":"https://api.github.com/users/statusquo69/repos","events_url":"https://api.github.com/users/statusquo69/events{/privacy}","received_events_url":"https://api.github.com/users/statusquo69/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-07T21:18:29Z","updated_at":"2016-03-15T01:55:50Z","closed_at":null,"body":"`rec_N = re.compile(\"^-?[0-9]+\", re.S)\r\nrec_R = re.compile(\"^-?[0-9]*(\\.[0-9]+)?\", re.S)\r\nrec_ID_E = re.compile(\r\n    \"[^A-Z0-9!\\\"&'()*+,\\-\\./:;?=\\sa-z%~@\\[\\]_{}\\\\\\|<>#$\\s]\", re.S)\r\nrec_ID_E5 = re.compile(\r\n    \"[^A-Z0-9!\\\"&'()*+,\\-\\./:;?=\\sa-z%~@\\[\\]_{}\\\\\\|<>^`#$\\s]\", re.S)\r\nrec_ID_B = re.compile(\"[^A-Z0-9!\\\"&'()*+,\\-\\./:;?=\\s]\", re.S)\r\nrec_DT = re.compile(\"^[0-9]+\", re.S)\r\nrec_TM = re.compile(\"^[0-9]+\", re.S)`\r\n\r\n[^0-9]+ means not in the set 0-9. The same issue occurs in ID_E, ID_E5, and ID_B. It should really be:\r\n\r\n`rec_N = re.compile(\"^-?[0-9]+\", re.S)\r\nrec_R = re.compile(\"^-?[0-9]*(\\.[0-9]+)?\", re.S)\r\nrec_ID_E = re.compile(\r\n    \"^[A-Z0-9!\\\"&'()*+,\\-\\./:;?=\\sa-z%~@\\[\\]_{}\\\\\\|<>#$\\s]\", re.S)\r\nrec_ID_E5 = re.compile(\r\n    \"6[A-Z0-9!\\\"&'()*+,\\-\\./:;?=\\sa-z%~@\\[\\]_{}\\\\\\|<>^`#$\\s]\", re.S)\r\nrec_ID_B = re.compile(\"^[A-Z0-9!\\\"&'()*+,\\-\\./:;?=\\s]\", re.S)\r\nrec_DT = re.compile(\"^[0-9]+\", re.S)\r\nrec_TM = re.compile(\"^[0-9]+\", re.S) `"},"comment":{"url":"https://api.github.com/repos/azoner/pyx12/issues/comments/196608451","html_url":"https://github.com/azoner/pyx12/issues/43#issuecomment-196608451","issue_url":"https://api.github.com/repos/azoner/pyx12/issues/43","id":196608451,"user":{"login":"azoner","id":929004,"avatar_url":"https://avatars.githubusercontent.com/u/929004?v=3","gravatar_id":"","url":"https://api.github.com/users/azoner","html_url":"https://github.com/azoner","followers_url":"https://api.github.com/users/azoner/followers","following_url":"https://api.github.com/users/azoner/following{/other_user}","gists_url":"https://api.github.com/users/azoner/gists{/gist_id}","starred_url":"https://api.github.com/users/azoner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azoner/subscriptions","organizations_url":"https://api.github.com/users/azoner/orgs","repos_url":"https://api.github.com/users/azoner/repos","events_url":"https://api.github.com/users/azoner/events{/privacy}","received_events_url":"https://api.github.com/users/azoner/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T01:55:50Z","updated_at":"2016-03-15T01:55:50Z","body":"The logic is intentional.  These regular expressions are not intended to match valid patterns.  The code that uses these regular expressions is looking for the first non-valid character - and throws an exception if found.\r\n\r\nThere are a number of unit tests in test_validation.py.  Do you have an example of a false positive or false negative value?\r\n"}}