D
djbitchpimp
I need to match either a field in the following form:
"6667"
or
"any"
or a string of this form:
"6666:6669"
with the same regular expression (without the quotes.)
I have tried a number of combinations but when I try:
/(\w+):?(\d+)?/ it only ever matches the first number before the colon.
Does anyone have any suggestions?
"6667"
or
"any"
or a string of this form:
"6666:6669"
with the same regular expression (without the quotes.)
I have tried a number of combinations but when I try:
/(\w+):?(\d+)?/ it only ever matches the first number before the colon.
Does anyone have any suggestions?