This PR contains 2 things:
Before merging, please make sure the test is passing on Linux or Mac. I can't test under these OS at the moment.
More robust regexp table building
Fix test suite to work on Windows
Escape slash in regexps
Fix line endings
nice, i'll have a look within the next few days.