insertCommand implements matches correctly