adapt regex for path variable feature