#include <iostream>
#include <string>
#include <regex>

std::string removeNonAlphanumeric(const std::string& input) {
    std::regex pattern("[^a-zA-Z0-9]");
    return std::regex_replace(input, pattern, "");
}

int main() {
    std::string regexValue = "^362501197003021448.*XX";
    std::string result = removeNonAlphanumeric(regexValue);
    std::cout << "Original string: " << regexValue << std::endl;
    std::cout << "Processed string: " << result << std::endl;
    return 0;
}