pub fn get(&self, index: usize) -> Option<&str> {
        match self.inner {
            MaybeOwnedText::Borrowed(ref captures) => {
                captures.get(index).map(|capture| capture.as_str())
            }
            MaybeOwnedText::Owned(ref captures) => captures.get(index),
        }
    }
Gets the matched text of a capture at the given index.

All [`Program`]s have an implicit capture of the complete text at index
zero. Capturing tokens are indexed from one, so any capturing
sub-expression will be indexed after the implicit complete text. For
example, the sub-expression `*` in the glob expression `*.txt` is at
index one and will exclude the suffix `.txt` in its matched text.

Alternative and repetition patterns group their sub-globs into a single
capture, so it is not possible to isolate matched text from their
sub-globs. This can be used to explicitly group matched text, such
as isolating an entire matched file name using an expression like
`{*.{go,rs}}`.

[`Program`]: crate::Program
crates/turborepo-wax/src/capture.rs