Add `re.suffixmatch` as an end-anchored equivalent to `re.prefixmatch`

With Python 3.15 and the addition of re.prefixmatch as a soft deprecation of re.match perhaps it is time to add an additional API to the re package - suffixmatch. This API would match a pattern as end-anchored similar to how re.prefixmatch matches a pattern as start-anchored.

2 Likes

Hey friends, long time listener, first-time caller… :grinning_face_with_smiling_eyes:

The lack of suffixmatch was the first thing I thought of when I read about prefixmatch. I’m +1 for the symmetry.

2 Likes