replaced regex with trim()