Added preg_match_multiple helper function