blob: 82b84f48aa4fd6d9d48c061ddd6a469bc1557bc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# Lua Bindings
This directory contains Lua bindings for bp.
## API
```lua
local bp = require("bp")
local m, i, len = bp.match("like finding a needle in a haystack", '"n" @Es=+`e "dle"')
--> {[0]="needle", Es={[0]="ee"}}
--> tostring(m) == "needle", tostring(m.Es) == "ee"
local replaced = bp.match("like finding a needle in a haystack", '"n" +`e "dle"', "cat")
--> "like finding a cat in a haystack"
```
|