C++ Regex implimentation