replace caret with ~ for windows