We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently I use lua pattern matching to find valid semantic versions, but I don't feel very reliable.
function semver.match(str, pos, pattern) local patterns = pattern or {"%d+[.]%d+[-+.%w]*", "%d+[.]%d+[.]%d+", "%d+[.]%d+"} for _, pattern in ipairs(table.wrap(patterns)) do local version_str = str:match(pattern, pos) if version_str then local info = semver.parse(version_str) if info then local instance = table.inherit(_instance) instance._INFO = info return instance end end
Would it be better to provide a semver.match interface in the sv library for fast matching?
see xmake-io/xmake#677
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently I use lua pattern matching to find valid semantic versions, but I don't feel very reliable.
Would it be better to provide a semver.match interface in the sv library for fast matching?
see xmake-io/xmake#677
The text was updated successfully, but these errors were encountered: