feed: fix incorrect regex handling in buildLegend