in reply to Re^2: regexp match repetition breaks in Perl
in thread regexp match repetition breaks in Perl

Yes, although my way works for the data given it could easily break down as you point out. Your method is safer. I'm wondering why the OP captures the 'APC' and 'APCs' strings; they seem to have no bearing on how many sets of digits follow.

Cheers,

JohnGG

  • Comment on Re^3: regexp match repetition breaks in Perl

Replies are listed 'Best First'.
Re^4: regexp match repetition breaks in Perl
by ikegami (Patriarch) on Jul 11, 2007 at 15:34 UTC
    I suspect it's just for debugging and that lima1 had the right idea when he/she put the numbers in a hash to filter out duplicates.