<font style="font-family: courier new,monospace;" face="courier new,monospace"><br></font><br style="font-family: courier new,monospace;"><div style="font-family: courier new,monospace;" class="gmail_quote">On Wed, Sep 22, 2010 at 2:03 PM, Fulko Hew <span dir="ltr"><<a href="mailto:fulko.hew@gmail.com">fulko.hew@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">given the sample pattern:<br><br>00.99.88.77.66.55.44.33.22.11<br><br>and I wanted to extract the 'n' amount of number-dot sequences<br>
how do I do it?<br><br>I tried something like /^(\d*\.){$n}/<br>
but that only got me the 'nth' number, not everything preceding it also.<br><br>ie if n=7<br><br>I want: '00.99.88.77.66.55.44'<br>not just:<br> '.44'<br></blockquote><div><br>Nevermind... that neuron finally decided to fire!<br>
The answer is an extra set of 'capture'. Ie.<br><br>/^((\d*\.)){$n}/<br></div></div><br style="font-family: courier new,monospace;">