removed Regex because the version of g++ that comes with cygwin does not support it completely (apparently)