Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

404 B
Raw Blame
fun sortableSemver(version) {
  if (version == null) {
    return []
  }
  // Extract version pattern like "1.2.3" from strings like "v1.2.3-alpha"
  // Matches ClickHouse: extract(version, '(\d+(\.\d+)+)')
  let extracted := extractRegex(version, '(\\d+(\\.\\d+)+)')
  if (empty(extracted)) {
    return []
  }
  let parts := splitByString('.', extracted)
  return arrayMap(x -> toInt(x) ?? 0, parts)
}