  We investigate various connections between the 0-Hecke monoid, Catalan
monoid, and pattern avoidance in permutations, providing new tools for
approaching pattern avoidance in an algebraic framework. In particular, we
characterize containment of a class of `long' patterns as equivalent to the
existence of a corresponding factorization. We then generalize some of our
constructions to the affine setting.
