you know what I dont really have that experience in regular expression but here is an answer that might help you
put this before the event
static int afterdot=0;
static bool dot=false;
at text changed event put this code
for(int i=0;i<textbox1.text;i++)>
{
if(int.TryParse(textBox1.Text[i],int x))
{
if(dot)
{
afterdot++;
if(afterd>4)
{
textBox1.Text=textBox1.Text.Remove(i);
}
}
}
else
{
if(textBox1.Text[i]=="." && dot==false)
{
dot=true;
}
else
{
textBox1.Text=textBox1.Text.Remove(i);
}
}
}
I hope I helped
:-)