Skip to main content

parse_version

Function parse_version 

Source
pub fn parse_version(text: &str) -> Option<String>
Expand description

Extract the first dotted numeric version token (\d+(\.\d+)+) from text. Bare integers and dash-separated dates (2024-01-02) are skipped so a build date or revision number isn’t mistaken for a version.