I need a regular expression in which user could input only numeric or there be asterisk in the end. for example
12345, 123*, 5677*, *
but I don't know how to do this. any help?
I have tried this regular expression for numeric input but I don't know that if I want asterisk(*) in the end than what should be the regular expression
^[0-9]+$
Since the input can be only
*
as well, so make the digit(0-9
) portion optional and add additional\*
at the end to accept asterisks.