Fix permalinks that contain a regexp