Is there a (good) way of checking whether a parame...
# voxpupuli
a
Is there a (good) way of checking whether a parameter with type
String
is a semver? Something like this works when it is
Copy code
$version = '1.2.3'

  if Semver($version) =~ SemVer {
    notify {"yes": }
  }
But fails when it's something like
present
Copy code
Error: Evaluation Error: Error while evaluating a Function Call, 'new_Version' The string 'present' cannot be converted to a SemVer