Switched to posix standard regexes for compatibility with Cygwin and other systems that don't offer perl compatible regular expressions