{
  "id": 6663835,
  "title": "Soft-deprecating re.match()",
  "url": "https://urgent.news/2026/09/10/soft-deprecating-re-match",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-10T21:59:16.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://hugovk.dev/blog/2026/soft-deprecating-re.match/"
  },
  "original_language": "en",
  "account": "re.match() only matches patterns at the beginning of a string in Python, which can be surprising as it's an unusual behavior. It's different from re.search(), which scans the entire string for a match, and re.fullmatch(), which requires the entire string to match the pattern. To make the behavior more explicit, Python 3.15 introduces a new alias called re.prefixmatch() for re.match(). This soft-deprecates re.match(), meaning it won't be removed but new code is encouraged to use re.prefixmatch() instead. Re.prefixmatch() clearly indicates that only a prefix match is intended, while re.match() still exists for backward compatibility. In terms of performance, the functions without special characters tend to be faster. Ruff, a code analysis tool, can help avoid using re.match() in projects.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 2,
    "also_reported_by": [
      {
        "outlet": "Simon Willison",
        "title": "Soft-deprecating re.match()",
        "url": "https://urgent.news/2026/09/11/soft-deprecating-re-match",
        "published": "2026-09-11T14:47:57.000Z"
      }
    ]
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}