---
title: "Companion"
sidebar_label: "Companion"
description: "Kotlin binding reference: Companion."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../../index.md)/[io.clika.runtime](../../index.md)/[Regex](../index.md)/[Companion](index.md)

# Companion

[common]\
object [Companion](index.md)

## Functions

| Name | Summary |
|---|---|
| [compile](compile.md) | [common]<br>fun [compile](compile.md)(pattern: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), options: [RegexOptions](../../RegexOptions/index.md)? = null): [Regex](../index.md)<br>Compile [pattern](compile.md) with [options](compile.md) (the defaults when null). |
| [fullMatch](fullMatch.md) | [common]<br>fun [fullMatch](fullMatch.md)(text: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), pattern: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)): [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)<br>Compile [pattern](fullMatch.md) and match it against the whole [text](fullMatch.md) in one call; compile once for a hot path. |
| [partialMatch](partialMatch.md) | [common]<br>fun [partialMatch](partialMatch.md)(text: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), pattern: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)): [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)<br>Compile [pattern](partialMatch.md) and look for it anywhere in [text](partialMatch.md) in one call. |
| [quoteMeta](quoteMeta.md) | [common]<br>fun [quoteMeta](quoteMeta.md)(literal: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)<br>Escape the metacharacters of [literal](quoteMeta.md) so the result matches it verbatim. |