From 6c612d4defbab5dad2c582ebb222ef791f474007 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 24 Sep 2021 22:57:39 -0700 Subject: Updated docs slightly --- Lua/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Lua/README.md') diff --git a/Lua/README.md b/Lua/README.md index dfc10bf..82b84f4 100644 --- a/Lua/README.md +++ b/Lua/README.md @@ -6,6 +6,9 @@ This directory contains Lua bindings for bp. ```lua local bp = require("bp") -local m, i, len = bp.match("like finding a needle in a haystack", '"n" +`e "dle"') +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" ``` -- cgit v1.2.3