cboettig / knitcitations

:package: Generate citations for knitr markdown and html files
http://carlboettiger.info
Other
220 stars 28 forks source link

Tweak to DOI matching regex #45

Closed noamross closed 11 years ago

noamross commented 11 years ago

DOIs should only contain one slash, so disallowed slashes in the second portion of the DOI regex.

cboettig commented 11 years ago

Actually -- do you have a reference for that btw? I just borrowed that regex from http://stackoverflow.com/questions/27910/finding-a-doi-in-a-document-or-page

which suggests that slashes are permitted, but I haven't checked the specification myself. If so, you might want to leave a comment on that SO thread to that effect.

Also I note that Dryad suggests that versioning with DOIs does use an extra slash http://wiki.datadryad.org/DOI_Usage

noamross commented 11 years ago

I don't, actually. I was just noticing that CrossRef wasn't resolving DOIs with a slash, but maybe it was publishers implementing them strangely. (Like 10.458/whatever/abstract)