From 196dcf46fe1450d7f0aa350ed18ed0b15debfff2 Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Thu, 15 Aug 2024 23:46:48 +0200 Subject: [PATCH] update regex example for playground --- adana-playground/examples.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/adana-playground/examples.js b/adana-playground/examples.js index e5b45e2..49d1de9 100644 --- a/adana-playground/examples.js +++ b/adana-playground/examples.js @@ -68,15 +68,16 @@ for i in 0..10 { key: "is_match", label: "Is match (regex)", script: `pattern = """(?i)a+(?-i)b+""" - text = "AaAaAbbBBBb" - is_match(text, pattern)` +text = "AaAaAbbBBBb" +println(is_match(text, pattern)) +` }, { key: "match", label: "Match (regex)", script: `pattern = """(\w+): \$(\d+)""" - text = "Item1: $100, Item2: $200, Item3: $300" - match(text, pattern)` +text = "Item1: $100, Item2: $200, Item3: $300" +println(match(text, pattern))` }, { key: "strings",