Code to reproduce:
let inputString = "url(https://example.com)"
let regex = Regex {
"url("
Capture {
.url()
}
")"
}
guard let (_, url) = inputString.firstMatch(of: regex)?.output else {
fatalError()
}
print(url)
Regex matches if we change "url(" to "(":
let regex = Regex {
"("
Capture {
.url()
}
")"
}
However, the output is
Is this a bug?