Tea — a strongly typed scripting languageCompiles native via LLVM
Tea
DocsPlaygroundExamplesReferenceCommunity
GitHub

Tea Language

A strongly typed scripting language for native tools.

© 2026 Tea Language.

ContributingCommunityRepository

Language Runtime

Built-ins

Standard Library

std.argsstd.assertstd.audiostd.encodingstd.envstd.fsstd.hashstd.httpstd.netstd.jsonstd.mathstd.parsestd.pathstd.processstd.randomstd.regexstd.stringstd.timestd.url

Standard Library

std.regex

Regular expression pattern matching and text manipulation.

Exported functions

pub def compile(pattern: String) -> Int

Compile a regex pattern and return a handle.

pub def is_match(handle: Int, text: String) -> Bool

Test if the pattern matches anywhere in the text.

pub def find_all(handle: Int, text: String) -> List[String]

Find all non-overlapping matches as a list of strings.

pub def captures(handle: Int, text: String) -> List[String]

Get capture groups from the first match.

pub def replace(handle: Int, text: String, replacement: String) -> String

Replace the first match with a replacement string.

pub def replace_all(handle: Int, text: String, replacement: String) -> String

Replace all matches with a replacement string.

pub def split(handle: Int, text: String) -> List[String]

Split the text by the pattern into a list of strings.