ACK. I know many languages, and my advice after using C++ for several years is: Don't dare try to do everything in C++. Use C++ only when it is absolutely necessary.
Just compare this C++ code
http://shootout.alioth.debian.org/u32/program.php?test=regex...
with this equivalent Javascript code to understand immediately what I mean:
http://shootout.alioth.debian.org/u32/benchmark.php?test=reg...
It's funny that this V8 code runs even 4.5 times faster (!) than C++ :)
http://shootout.alioth.debian.org/u32/performance.php?test=r...