-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Update Protein Ontology regex specification #959
Comments
Awesome, thanks @nataled. |
Closes #959 Co-Authored-By: Darren A. Natale <13770634+nataled@users.noreply.github.com>
The regex given above is from the OBO PURL system, but I can see that it is not as precise as the one I use internally: ^(?:\d{9}|[OPQ][0-9][A-Z0-9]{3}0-9?|[A-NR-Z]0-9{1,2}(?:-\d+)?)$ This version specifies the allowed number of digits (nine) and also specifies that the parentheses are not intended for string capture. Perhaps this version will work better? |
Yes, this one appears to work, but what is going on with the colons? |
The ?: at the beginning of each parenthetical expression says "don't save the contents of the parentheses match". Those parenthetical expressions are there only because they represent optional parts. Taught to me and recommended by James Overton. |
I noticed that the first regex appears to have links in it. When I did a copy/paste they showed up. |
Closes #959 --------- Co-authored-by: Darren A. Natale <13770634+nataled@users.noreply.github.com> Co-authored-by: David Linke <2648874+dalito@users.noreply.github.com>
Prefix
pr
Explanation
The given regex in Bioregistry is incomplete. In general there are two types of local identifiers in PR:
The full regex is thus:
^(\d+|[OPQ][0-9][A-Z0-9]{3}0-9?|[A-NR-Z]0-9{1,2}(-\d+)?)$
Contributor ORCID
0000-0001-5809-9523
The text was updated successfully, but these errors were encountered: