using System.Text.RegularExpressions;
private static string ConvertSuperscriptToText(Match m){
string res = m.Groups[1].Value;
public static void Main()
string expression = "2⁻¹² + 3³ / 4⁽³⁻¹⁾";
string desiredResult = "2^-12 + 3^3 / 4^(3-1)";
string supChars = "([¹²³⁴⁵⁶⁷⁸⁹⁰⁺⁻⁽⁾]+)";
string result = Regex.Replace(expression, supChars, ConvertSuperscriptToText);
Console.WriteLine(result);
Console.WriteLine(result == desiredResult);