<p>The <a href="http://doi.org/" rel="noreferrer">DOI</a> system places basically no useful limitations on what constitutes <a href="http://doi.org/handbook_2000/enumeration.html#2.2" rel="noreferrer">a reasonable identifier</a>. However, being able to pull DOIs out of PDFs, web pages, etc. is quite useful for citation information, etc.</p>

<p>Is there a reliable way to identify a DOI in a block of text without assuming the 'doi:' prefix? (any language acceptable, regexes preferred, and avoiding false positives a must)</p>

The following regex should do the job (Perl regex syntax):
```
```
/(10\.\d+\/\d+)/
```
```
You could do some additional sanity checking by opening the urls
```
```
http://hdl.handle.net/<doi>
```
```
and
```
```
http://dx.doi.org/<doi>
```
```
where  is the candidate doi,
and testing that you a) get a 200 OK http status, and b) the returned page is not the "DOI not found" page for the service.