Acceptable format:
0
1,2
1,100,2000,30000
etc...
Regular expression:
Match(a_s_stat, "^\d+(,\d+)*$")
The function returns false. String a_s_stat is: 0,1
How to save correctly a regular expression in PowerBuilder 9.0?
Acceptable format:
0
1,2
1,100,2000,30000
etc...
Regular expression:
Match(a_s_stat, "^\d+(,\d+)*$")
The function returns false. String a_s_stat is: 0,1
How to save correctly a regular expression in PowerBuilder 9.0?
This code should solve your problem - although not as pleasant as a "real" regex
if Match(data, "^[0-9]+$") or &
( Match(data, "^[0-9]+[,0-9]*[0-9]+$") and not Match(data, ",,") ) then
statusText = "<data> is list of integers"
else
statusText = "Cannot interpret <data> as list of integers"
end if