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.

1.2 KB
Raw Blame
print('-- match --')
print(match('uu', 'u'))
print(match('uu', 'b'))
print(match(null, 'u'))
print(match(null, 'b'))
print(match('uu', null))
print(match('null', null))

print('uu' =~ 'u')
print('uu' =~ 'b')
print(null =~ 'u')
print(null =~ 'b')
print('uu' =~ null)
print('null' =~ null)

print('-- string and array functions on null --')
print(length(null))
print(upper(null))
print(reverse(null))
print(replaceOne(null, 'a', 'b'))
print(replaceAll(null, 'a', 'b'))
print(trim(null))
print(trimLeft(null))
print(trimRight(null))
print(keys(null))
print(values(null))
print(arrayExists(x -> x = 'a', null))
print(arrayMap(x -> x, null))
print(arrayFilter(x -> x = 'a', null))
print(arrayCount(x -> x = 'a', null))
print(arrayReduce((acc, x) -> acc + x, null, 0))
print(splitByString(' ', null))
print(arrayStringConcat(arrayPopFront(splitByString(' ', null)), ' '))
print(0 == null)
print(0 != null)
print(0 not between 1 and 10)
print(length(null) > 3)
print(length(null) < 3)
print(null < 3)
print(null <= 0)
print(null > 3)
print(null >= 0)
print(3 > null)
print(null > null)
print(not (length(null) > 3))
print(length(null) = 0)
print(less(null, 3))
print(greater(3, null))
print(lessOrEquals(null, null))
print(greaterOrEquals(null, 0))
print(less(1, 3))