Lite XL

About

FAQ Features Screenshots Contributors

Documentation

Usage Build Default Keymap MacOS Keymap

Tutorials

Simple Plugin Syntax Highlighting API Overview System Fonts

Plugins

Downloads

Regex API

This API provides PCRE regular expressions for those who needs more power in matching text. This API written in C and Lua.

Creating a regex

Use regex.compile(pattern, options) to compile a regex.

Matching

Low level functions

Note: regex:cmatch() returns wrong indexes (currently at version 2.0.2). The end index returned by regex:cmatch() is always off by 1 (-1 to get the actual end index).

High level functions

All the functions below can be in 2 forms: - regex:fn(...) where regex is the compiled regex instance - regex.fn(pattern, ...) where pattern is a pattern string to be compiled and used directly.

We will only document the first form.

Get Involved

Github Discord Matrix

Status