Wyrażenia regularne do tego? Po co?
Kod
<script>
function test( x ){
if( parseInt(x) == x ) return true;
if( parseFloat(x) == x ) return true;
if( parseFloat( x.replace(',','.') ) == x.replace(',','.') ) return true;
return false;
}
alert( test("1.23123,12") );
alert( test("dad123,312") );
alert( test("2131,12") );
alert( test("1231.31") );
alert( test("12312") );
</script>
Może jakiegoś wyjątku brakować

Ale wtedy dopisz sobie to sam.