an empty string will pass through preg_match_all() without any harmful effects, so we don't need to check for it.