Changed trimRegex to trimChar