As for the regular expression (TASK_NAME_RX), I'm of the opinion that its definition should stay near the other regular expression (NAME_RX)'s definition. That way they get maintained together, since they are 98% alike.