Document and unit-test regex-capture reset logic (#1451)

* mlr --norc cat was erroring

* Document and unit-test regex-capture reset logic
This commit is contained in:
John Kerl 2023-12-19 09:47:59 -05:00 committed by GitHub
parent b13adbe6c0
commit 4706b4bb78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1 @@
mlr -n put -f ${CASEDIR}/mlr

View file

@ -0,0 +1,9 @@
[\1]:[\2]
true
[]:[]
true
[a]:[c]
false
[]:[]
null
[\1]:[\2]

View file

@ -0,0 +1,11 @@
end {
print("[\1]:[\2]");
print("abc" =~ "...");
print("[\1]:[\2]");
print("abc" =~ "(.).(.)");
print("[\1]:[\2]");
print("abc" =~ "(.)x(.)");
print("[\1]:[\2]");
print("abc" =~ null);
print("[\1]:[\2]");
}