MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _first_matching_url

Function _first_matching_url

deployments/desktop/shared/agents.py:533–538  ·  view source on GitHub ↗
(text: str, needle: str)

Source from the content-addressed store, hash-verified

531 return path.stem
532
533
534def _first_matching_url(text: str, needle: str) -> str:
535 pattern = re.compile(r"https?://[^\s)>\]]+", flags=re.IGNORECASE)
536 for match in pattern.findall(text or ""):
537 if needle.lower() in match.lower():
538 return match.rstrip(".,")
539 return ""
540
541

Callers 2

_report_abs_urlFunction · 0.85
_report_recordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected