Friday, 19 January 2007
The best solution?
Posted on 06:42 by Unknown
Have you ever wondered what the best solution is? For example, what if somebody asks you 'What is the correct regex pattern that would match to any 3 digits from 0-9 but not match if those three digits are all zeros, e.g. 123 is a match but 000 is not a match?'So what is the best solution? Is it: ([1-9]\d\d|\d[1-9]\d|\d\d[1-9])This still would allow a string like 1234 to be correct.Or this one:^(
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment