Re: GRegex regular expression failing to match



On Mon, May 14, 2012 at 01:36:02PM -0800, Christopher Howard wrote:
Is there anything wrong with the regexp,

Sure.  Two things.  It should be

    ^/[0-9]+$

not

    ^/d+$

First, it lacks the backslash to make \d a digit atom.  But, second,
since \d matches a digit (possibly whatever Unicode may say is a digit),
not 0-9, you should really use [0-9] to match ASCII digits.

Yeti



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]