From 207f4a8fdc08c8f98b985e8e9f98ba419d5b9600 Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Sat, 21 Sep 2024 02:18:42 +0800 Subject: [PATCH] Regex test suit script snippet file. --- test/regex.zhv | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/regex.zhv diff --git a/test/regex.zhv b/test/regex.zhv new file mode 100644 index 0000000..2c2ad4c --- /dev/null +++ b/test/regex.zhv @@ -0,0 +1,11 @@ +#!/bin/zhivo + +val emailRegex = `(\w+)(\.?\w+)*@(\w+)(\.\w+)+`; +val validEmail = "test@test.com"; +val invalidEmail = "test@test"; + +render! validEmail :: emailRegex; +render! invalidEmail :: emailRegex; + +render! validEmail !: emailRegex; +render! invalidEmail !: emailRegex;