in reply to Simple regex should match number

According to what I've read in perlretut (or at least how I interpret it), \p{Nd} says match a non-digit. Maybe you want \P{Nd} which is "Match anything that is NOT a non-digit (double negative equals a positive). But that's a rather convoluted way of saying \p{Digit} or \p{IsDigit}.I haven't tested, so I'll leave that to you to decide which works best.

Update: I guess I should have tested. :) It does match for me. ...and now I'll have to re-read the paragraph in perlretut. Perl 5.14.2. (And I see now that I did misread: \p{Nd} is indeed an affirmative, and \P{Nd} matches non-digit. So I do get a match, and you don't... we're back to square one. Move on to the next response. ;)


Dave