#include <iostream>
#include <regex>
using namespace std;

int main() {
    std::regex regx("\\$(\\w+)\\$(\\d+)"); 
    std::string inString("$C$5:$F$89");
    std::smatch match;
    std::vector<std::string> vecCol;
    std::vector<std::string> vecRow;

    while (std::regex_search(inString, match, regx)) {
        std::cout << match[0] << "\n";
        //add them to the vecs
        vecCol.push_back(match[1].str());
        vecRow.push_back(match[2].str());
        inString = match.suffix().str();
    }
	return 0;
}