Test, validate and match regular expressions
Parses version strings with up to four numeric components (major, minor, build, revision) separated by dots, followed by an optional prerelease suffix like -beta or -rc that may include a trailing number (e.g. -alpha.2). Named capture groups make it easy to extract each version part for validation or comparison. Useful in build scripts, changelogs, and dependency manifests. The multiline flags enable matching version strings line-by-line in larger documents.