var reg = /^d+$/;
should do it. The original matches anything that consists of exactly one digit.
1.4m articles
1.4m replys
5 comments
56.9k users