UPdate.
WrenCI / mac (push) Waiting to run
WrenCI / windows (push) Waiting to run
WrenCI / linux (push) Failing after 55s

This commit is contained in:
2026-01-26 05:12:14 +01:00
parent a59dbe1d55
commit fe2f087d9f
143 changed files with 13333 additions and 15112 deletions
+25
View File
@@ -0,0 +1,25 @@
// retoor <retoor@molodetz.nl>
import "regex" for Regex, Match
var re = Regex.new("(\\w+)-(\\d+)")
var m = re.match("item-42")
System.print(m.text) // expect: item-42
System.print(m.group(0)) // expect: item-42
System.print(m.group(1)) // expect: item
System.print(m.group(2)) // expect: 42
System.print(m.groups[0]) // expect: item-42
System.print(m.groups[1]) // expect: item
System.print(m.groups[2]) // expect: 42
System.print(m.groups.count) // expect: 3
var re2 = Regex.new("(a)(b)(c)(d)")
var m2 = re2.match("abcd")
System.print(m2.groups[0]) // expect: abcd
System.print(m2.groups[1]) // expect: a
System.print(m2.groups[2]) // expect: b
System.print(m2.groups[3]) // expect: c
System.print(m2.groups[4]) // expect: d