Pattern
/\bv?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z.-]+)?\b/
Sample text
v1.2.3 2.0.0-beta.1 1.0 10.20.30Test this pattern in the editor
MAJOR.MINOR.PATCH with optional pre-release.
/\bv?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z.-]+)?\b/
v1.2.3 2.0.0-beta.1 1.0 10.20.30Test this pattern in the editor
Standard 8-4-4-4-12 hex UUID layout.
Stricter UUID version 4 with variant bits.
7–40 hex characters typical of git commits.
Absolute POSIX-style filesystem paths.
Drive-letter paths with backslashes.
Find spaces/tabs at end of lines.