[tpm] quicky regex question

Fulko Hew fulko.hew at gmail.com
Wed Sep 22 11:03:42 PDT 2010


given the sample pattern:

00.99.88.77.66.55.44.33.22.11

and I wanted to extract the 'n' amount of number-dot sequences
how do I do it?

I tried something like /^(\d*\.){$n}/
but that only got me the 'nth' number, not everything preceding it also.

ie if n=7

I want:   '00.99.88.77.66.55.44'
not just:
 '.44'

TIA
Fulko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20100922/d58b8409/attachment.html>


More information about the toronto-pm mailing list