modified 2012-01-08_Regular_Expression_Matching.cpp, accepted