I want to match strings with the following formats
and not match:
I just want to match any character in the beginning of the string and numbers in the end. the whole string should not exceed 15 characters.
So far, I've reached this regex:
^(.*)?\d{0,15}$
Although, the limit isn't working when I match any character with (.*)
.
Any thoughts?