MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / _clean

Function _clean

scripts/fetch_standards_overview.py:118–125  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

116
117
118def _clean(text: str) -> str:
119 text = re.sub(r'\n{3,}', '\n\n', text)
120 text = re.sub(r'(?i)buy together.*', '', text, flags=re.DOTALL)
121 text = re.sub(r'CHF \d+.*', '', text)
122 text = re.sub(r'English \| PDF.*', '', text)
123 text = re.sub(r'\*\*Read sample\*\*.*', '', text, flags=re.DOTALL)
124 text = text.strip()
125 return text
126
127
128def _extract_general_info(text: str) -> str:

Callers 2

extract_iso_contentFunction · 0.85
extract_iec_contentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected