Test, validate and match regular expressions
Matches semantic version strings following a major.minor.patch pattern (no leading zeros), with an optional prerelease suffix restricted to alpha, beta, or rc, optionally followed by a dot-separated numeric version (e.g., 1.2.3-beta.4). Uses named capture groups (major, minor, patch, prerelease, version) for easy extraction in Python. The gm flags enable matching multiple version strings across lines in a larger text. Useful for validating or parsing restricted SemVer 2.0.0-style release versions.