Assertions and named capture
A named capture, lookahead and negative assertion.
Scope: Regex syntax and structural exploration only. Match evidence requires an external engine.
Preview
Source
regex-assertions.puml
text/plain
@startregex
title Version capture
(?=v)(?<version>v\d+(?:\.\d+){1,2})(?![\w.])
@endregex