Makes sense, I mindlessly lifted (partial) code from Form_validation parser. ``preg_match_all()`` should work great.