From df844946f7d45fa39acf040eb8922ab658f9f5dd Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 4 Sep 2024 00:34:27 -0400 Subject: Add Text:matches() for convenience and performance --- test/text.tm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/text.tm') diff --git a/test/text.tm b/test/text.tm index e3848a08..af03c3c7 100644 --- a/test/text.tm +++ b/test/text.tm @@ -242,3 +242,11 @@ func main(): >> " BAD(x, fn(y), BAD(z), w) ":replace($/BAD(?)/, "good(\1)", recursive=no) = " good(x, fn(y), BAD(z), w) " + >> "Hello":matches($/{id}/) + = yes + >> "Hello":matches($/{lower}/) + = no + >> "Hello":matches($/{upper}/) + = no + >> "Hello...":matches($/{id}/) + = no -- cgit v1.2.3