You can ignore this btw, it's just a gut feel. passing regexes around like this seems a little clunky, but honestly I'd probably do the same thing.