axiak/pyre2 — pull request #8 by itsadok (2011-11-08 12:33:35+00:00)
Title: Fix issue #5

Hi,
Should have done this a long time ago, but I finally sat down to write the lines for handing \W, \S and \D.

Two issues:
1. I still have the older version of re2, so I did my coding and testing on the previous version, and didn't commit the changes to the cpp file. If you could build and run the test on the new version it would be great.

2. I couldn't figure out a good solution for [\W] and [\S], since they're made out of more than one character class, and De-Morgan's laws make it tricky to fix it in the general case. What I ended up doing is fall back to python re when I detect those char classes inside a char class definition.