regexlib

package
v0.0.0-...-e0b5347 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package regexlib is an example of how to make a go library for lua. It allows using Go regular expressions in Lua code. To use in a runtime r, add the following Go code:

regexlib.LibLoader.Run(r)

Then in Lua code e.g.

regex = require"regex"
ptn = regex.new("[0-9]+")
match = ptn:find("hello there 123 yippee")

Index

Constants

This section is empty.

Variables

View Source
var LibLoader = packagelib.Loader{
	Load: load,
	Name: "regex",
}

LibLoader defines the name of the package and how to load it. Given a runtime r, call:

regexlib.LibLoader.Run(r)

To load the package into the runtime (note that packagelib needs to be loaded first).

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL