Suppose we have a list of teams, named like this:
Team B, ...,
Team Z. Then:
Team [AB]: This will match either either
Team [^AB]: This will match any team except
We often need to match characters that "belong" together in some context or another (like letters from
Z), and this is what character classes are for.