change regular expression to work in both linux and windows