hi! the following pattern (35 matching token, and at least one more) with this simple expression ("[_]+$") throws "memory exhausted" when using wchar_t strings. the same works with char strings even triple sized. matching doesnt throw, if we use "^[_]+$", "[_]{1,}$", "[_][_]*$" etc. so this is a bug. it seems the expression-string is short enough to cause some problem, but i was unable to track down the error. wchar_t * wp = L"___________________________________x"; wregex wre(L"[_]+$"); try { regex_search(wp, wre); } catch (bad_expression & e) { cout << e.what() << endl; } another issue: i think, "(one|two|three|)" style alternation (notice the empty string on the right) should be accepted and handled as "(one|two|three)?" now it throws bad_expression