Match the pattern to the start of the input.