Replaced deprecated reference to trim_chars with trim_matches