Data centers are being distributed worldwide by cloud service providers (CSPs) to save energy costs through efficient workload allocation strategies. Many CSPs are challenged by the significant rise in user demands due to their extensive energy consumption during workload processing. Numerous research studies have examined distinct operating cost mitigation techniques for geo-distributed data centers (DCs). However, operating cost savings during workload processing, which also considers string-matching techniques in geo-distributed DCs, remains unexplored. In this research, we propose a novel string matching-based geographical load balancing (SMGLB) technique to mitigate the operating cost of the geo-distributed DC. The primary goal of this study is to use a string-matching algorithm (i.e., Boyer Moore) to compare the contents of incoming workloads to those of documents that have already been processed in a data center. A successful match prevents the global load balancer from sending the user’s request to a data center for processing and displaying the results of the previously processed workload to the user to save energy. On the contrary, if no match can be discovered, the global load balancer will allocate the incoming workload to a specific DC for processing considering variable energy prices, the number of active servers, on-site green energy, and traces of incoming workload. The results of numerical evaluations show that the SMGLB can minimize the operating expenses of the geo-distributed data centers more than the existing workload distribution techniques.