Parse 2026/193 amendment to extract new standard entries.
(html: str)
| 225 | |
| 226 | |
| 227 | def parse_amendment_additions(html: str) -> list[dict]: |
| 228 | """Parse 2026/193 amendment to extract new standard entries.""" |
| 229 | soup = BeautifulSoup(html, "html.parser") |
| 230 | text = soup.get_text() |
| 231 | |
| 232 | # Find "the following entries are added" section |
| 233 | additions = [] |
| 234 | # Match standard references in the amendment text |
| 235 | pattern = r"(EN\s+(?:ISO|IEC)\s+[\d\-]+(?::[\d]+)?(?:/A\d+:[\d]+)?)" |
| 236 | matches = re.findall(pattern, text) |
| 237 | |
| 238 | # Remove duplicates while preserving order |
| 239 | seen = set() |
| 240 | for match in matches: |
| 241 | if match not in seen: |
| 242 | seen.add(match) |
| 243 | additions.append(match) |
| 244 | |
| 245 | return additions |
| 246 | |
| 247 | |
| 248 | def classify_standard(entry: dict) -> str: |