11,579 questions
Try this:
string input = "The result of 2³ is eight.";
Regex regex = new Regex( @"(\d+)([\xB2\xB3\xB9\u2070\u2074-\u2079]+)" );
Match match = regex.Match( input );
if( match.Success )
{
int baseNum = int.Parse( match.Groups[1].Value );
int exponent = int.Parse( match.Groups[2].Value.Normalize( NormalizationForm.FormKC ) );
Console.WriteLine( $"Base: {baseNum}, Exponent: {exponent}" );
}
else
{
Console.WriteLine( "No match found." );
}