If .NET can cope with an arbitrary amount of look behind, try replacing the following pattern with an empty string:
(?<=\*.*)\*
.
PS Home:\> 'test*','*test*','test** *e' -replace '(?<=\*.*)\*',''
test*
*test
test* e
Another way would be this pattern:
(?<=\*.{0,100})\*
where the number 100
can be replaced with the size of the target string.
And testing the following with Mono 2.0:
using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
Regex r = new Regex(@"(?<=\*.*)\*");
Console.WriteLine("{0}", r.Replace("test*", ""));
Console.WriteLine("{0}", r.Replace("*test*", ""));
Console.WriteLine("{0}", r.Replace("test** *e", ""));
}
}
also produced:
test*
*test
test* e