Update Collector.php

It's much faster than preg_match.