Where can i find detailed and intuitive explanation of Regex function in c++ with certain examples. I see so many string problems can be easily solved with RegEX so it seems intriguing to me. P.S Which algorithm (what complexity) is used in regex to find a substring in a string?