Cleaner parsing of filter parameters

Use a regex and assignment in the if statement to avoid having to
do a substring calculation with a magic number 7 to remove the "filter_"
prefix.