Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mexico RFC invalid #204

Closed
woile opened this issue Mar 11, 2016 · 2 comments
Closed

Mexico RFC invalid #204

woile opened this issue Mar 11, 2016 · 2 comments
Assignees
Labels

Comments

@woile
Copy link

woile commented Mar 11, 2016

The RFC regex is not right, I've used the one mentioned in this web and seems to work fine.

r'^([A-Z|a-z|&]{3}\d{2}((0[1-9]|1[012])(0[1-9]|1\d|2[0-8])|(0[13456789]|1[012])(29|30)|(0[13578]|1[02])31)|([02468][048]|[13579][26])0229)(\w{2})([A|a|0-9]{1})$|^([A-Z|a-z]{4}\d{2}((0[1-9]|1[012])(0[1-9]|1\d|2[0-8])|(0[13456789]|1[012])(29|30)|(0[13578]|1[02])31)|([02468][048]|[13579][26])0229)((\w{2})([A|a|0-9]{1})){0,3}$'

With the current regex, this RFC GOH831115 is valid and in this web says it is not valid.

If you want I can make a PR, np.

Thank you

@benkonrath
Copy link
Member

Thanks for the bug report. It looks like the min length should be 12 instead of 9.

https://technet.microsoft.com/en-us/library/hh242611.aspx

This means that the regex is also wrong because the last part isn't optional. I don't want to copy the regext from that website because I don't know what the license is. I'll fix this.

@woile
Copy link
Author

woile commented Mar 12, 2016

Wow I didn't know regex could be licensed :/
Thanks for the update, I will be uploading my project soon.

@benkonrath benkonrath added the bug label Mar 12, 2016
@benkonrath benkonrath self-assigned this Mar 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants