# Soft-deprecating re.match()

DevFeed: [Soft-deprecating re.match()](<https://devfeed.tech/articles/soft-deprecating-re-match-31169.md>)

Original publisher: [Read original article](<https://simonwillison.net/2026/Sep/11/soft-deprecating-re-match/>)

Author: Simon Willison

Published: 2026-09-11T14:47:57Z

Content type: article

Language: en

Sources: [Simon Willison's Weblog](<https://devfeed.tech/sources/simon-willison-s-weblog.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [python](<https://devfeed.tech/tags/python.md>), [python-1-283](<https://devfeed.tech/tags/python-1-283.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [regular-expressions-38](<https://devfeed.tech/tags/regular-expressions-38.md>), [release](<https://devfeed.tech/tags/release.md>)

## AI overview

Python 3.15 is soft-deprecating the confusing re.match() function, recommending clearer alternatives such as re.prefixmatch(), re.search(), and re.fullmatch().

## Source excerpt

Soft-deprecating re.match() Python has a concept of soft deprecation, where APIs are marked as "should no longer be used to write new code" without any promise/threat to remove them in the future. Python 3.15 release manager Hugo van Kemenade describes how in the upcoming 3.15 release soft deprecation has come for the venerable but deeply confusing re.match() function. It's now available with the much clearer alternative re.prefixmatch() name - reflecting how it anchors at the beginning of the string but not the end. Most of the time you probably want re.search() (match this pattern anywhere in the string) or re.fullmatch() (match the entire string) instead. Via Lobste.rs Tags: python, regular-expressions