This expression should check for a number> 1
^ [1-9] + [0-9] * $
Update:
I am using ASP.NET validation validation.
Thanks.
You say that this is homework, so I will give my answer more than 57; You can accept this idea and change it.
/^([6-9][0-9]|5[89]|[1-9][0-9]{2,})$/
If you do not have the {a,} construct,
{a,}
/^([6-9][0-9]|5[89]|[1-9][0-9][0-9]+)$/
I agree with the comment by @Rowlf! You do not need a regular expression for this (unless it is an interview question :)). Just use the '>'.
Well, your given regular expression ^[1-9]+[0-9]*$ matches >=1 not only >1
^[1-9]+[0-9]*$
>=1
>1