Avatar
@swift-5.9.2 import RegexBuilder let regex = Regex { "x" } let text = "xxx" print(text.matches(of: regex).count) (edited)