Because I'm tired and lazy, and because it's better, I'm going to use preg_match instead of ereg. That way I can go \d instead of [0-9] or [[:digit:]] and I can use assertions.
First off, your description is inconsistent with your examples. If your description was correct, then \$\d{1,4}.\d{2} would do the job. But that won't match four out of five valid examples. The hariness is that $111 is valid but $111. isn't. On the other hand, $111.11 is.
But here's a bit of code.
$tests=array('$11', '$1.10', '$1.1',
'$100', '$100.1', '$', '11',
'1.10', '1.1', '1.1', '$111.');
foreach($tests as $test)
{
if(preg_match('/\$\d{1,4}(?!\d)(.\d{1,2})?(?!.)/',$test,$matches))
echo "$test Pass - matched $matches[0]\n";
else
echo "$test Fail\n";
}
It's a horrible mess, but so's the format. Maybe it could be improved.