From 8a94cf536705080243c347527fd2e901c80faec2 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Sun, 26 Aug 2018 13:59:20 -0400 Subject: [PATCH] regex-extract iterate (regression testing) --- c/reg_test/run | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/c/reg_test/run b/c/reg_test/run index 6fe4d276b..cb34839ce 100755 --- a/c/reg_test/run +++ b/c/reg_test/run @@ -2027,7 +2027,7 @@ _EOF export TZ= # ---------------------------------------------------------------- -announce DSL SUB/GSUB +announce DSL SUB/GSUB/REGEX_EXTRACT run_mlr --opprint put '$y = sub($x, "e.*l", "")' $indir/sub.dat run_mlr --opprint put '$y = sub($x, "e.*l"i, "")' $indir/sub.dat @@ -2076,6 +2076,20 @@ run_mlr --opprint put '$y = ssub($x, "nonesuch", "")' $indir/sub.dat run_mlr --opprint put '$y = ssub($x, "nonesuch", "1234")' $indir/sub.dat run_mlr --opprint put '$y = ssub($x, "nonesuch", "1234567890")' $indir/sub.dat +run_mlr --oxtab put '$y = regex_extract($x, "[A-Z]+")' $indir/sub.dat +run_mlr --oxtab put '$y = regex_extract($x, "[A-Z]*")' $indir/sub.dat +run_mlr --oxtab put '$y = regex_extract($x, "[a-z]+")' $indir/sub.dat +run_mlr --oxtab put '$y = regex_extract($x, "[a-z]*")' $indir/sub.dat +run_mlr --oxtab put '$y = regex_extract($x, "[0-9]+")' $indir/sub.dat +run_mlr --oxtab put '$y = regex_extract($x, "[0-9]*")' $indir/sub.dat + +run_mlr --oxtab put '$y = regex_extract($x, "[ef]+")' $indir/sub.dat +run_mlr --oxtab put '$y = regex_extract($x, "[ef]*")' $indir/sub.dat +run_mlr --oxtab put '$y = regex_extract($x, "[hi]+")' $indir/sub.dat +run_mlr --oxtab put '$y = regex_extract($x, "[hi]*")' $indir/sub.dat +run_mlr --oxtab put '$y = regex_extract($x, "[op]+")' $indir/sub.dat +run_mlr --oxtab put '$y = regex_extract($x, "[op]*")' $indir/sub.dat + # ---------------------------------------------------------------- announce DSL SUBSTR