Regex to match odd numbers

David Cantrell david at cantrell.org.uk
Wed May 28 12:45:07 BST 2014


On Tue, May 27, 2014 at 03:37:51PM -0400, Mark Fowler wrote:
> On Tuesday, May 27, 2014, Sam Kington <sam at illuminated.co.uk> wrote:
> > Sounds like you want something like
> >   / ( ^ 5[.] ( [79] | \d+ [13579] ) ) /x
> This is where I mention that \d matches characters other than [0-9] unless
> you have the /a flag in effect (thanks Unicode!)

I'm sure that if the p5p cabal want to spoil peoples' day, they have far
more entertaining things they can do than to release perl version 5.2Ù¥.

-- 
David Cantrell | A machine for turning tea into grumpiness

  Irregular English:
    ladies glow; gentlemen perspire; brutes, oafs and athletes sweat


More information about the london.pm mailing list