diff --git a/src/packaging/version.py b/src/packaging/version.py index 7ee73628..48705389 100644 --- a/src/packaging/version.py +++ b/src/packaging/version.py @@ -119,7 +119,7 @@ def __ne__(self, other: object) -> bool: (?P[0-9]+(?:\.[0-9]+)*) # release segment (?P
                                          # pre-release
             [-_\.]?
-            (?P(a|b|c|rc|alpha|beta|pre|preview))
+            (?Palpha|a|beta|b|preview|pre|c|rc)
             [-_\.]?
             (?P[0-9]+)?
         )?