$_ = "caaat"; my @hits = /(?|c(a)|k(t))/g; say scalar @hits; say @hits; __END__ 1 a