(text: str)
| 323 | |
| 324 | |
| 325 | def extract_doi(text: str) -> str | None: |
| 326 | if not text: |
| 327 | return None |
| 328 | match = re.search(r"(10\.\d{4,9}/[-._;()/:A-Z0-9]+)", text, flags=re.IGNORECASE) |
| 329 | if not match: |
| 330 | return None |
| 331 | return match.group(1).rstrip(").,;]") |
| 332 | |
| 333 | |
| 334 | def is_probable_url(text: str) -> bool: |
no outgoing calls