we have hundreds of path_regexes (see #5118), so let's not convert the same bytes to str for each of them.