E-Ink News Daily

Back to list

Soft-deprecating re.match()

Python 3.15 introduces a soft-deprecation of the long-standing re.match() function in favor of the clearer re.prefixmatch() alternative. The move aims to reduce confusion, as most users actually need re.search() or re.fullmatch() instead.

Background

Python's re.match() has long been a source of confusion because it only matches at the beginning of a string, unlike what many developers expect from the word 'match.' Python's soft deprecation model marks APIs as discouraged for new code without committing to removal.

Source
Simon Willison
Published
Sep 11, 2026 at 10:47 PM
Score
6.0 / 10