It could, I was prematurely optimizing away the method call to matches().