in reply to regexp with repetition of non-capturing group

I agree with Old_Gray_Bear, split looks like the right solution here.
my $line = 'somthing apache24 up 11572 Mar 15 16:25 161. +20.224.243:8808 161.20.224.243:8802 161.20.224.243:8809'; my ($col1,$col2,$col3,$size,$month,$date,$time,@ips) = split /\s+/, $line; print "@ips"; __END__ 161.20.224.243:8808 161.20.224.243:8802 161.20.224.243:8809
@ips will be all of the tokens left after assigning the scalars at the beginning of the line. Will work fine even if there are a 100 of them!

It is possible to write a regex that does exactly what the split would do. But since splitting on white space works so well in this example, I didn't bother to do any regex testing. The key regex feature that is applicable here is "match global". If you had trouble say getting everything to work as a single regex, there is nothing wrong with writing one to get the initial scalars, and then run a second regex to get all of the ip's.  @ips=/($ipregex)/g; That "g" at the end is what does the "match global" magic. In most cases, running a couple of regex's on the same line makes no performance problem.

Update: You didn't show your left hand assignment statement, but what I show above is what you want whether using split or a regex. Of course you should have better names than $col1, $col2, etc. In general I recommend not messing around with $1,$2 etc. Get these values into a readable name ASAP. I very seldom have any code like: $tokens[3]. In that case, you need a comment to describe what index 3 means... Far better is to have a name like $size which I demonstrate.