Fix router regexp generation