in reply to Match zero times in regex

Works for me:
$_ = "permit ip 10.11.1.0 0.0.0.255 192.168.100.0 0.0.0.255"; while (/(?:host){0}\s+(\d+\.\d+\.\d+\.\d+)\s+(\d+\.\d+\.\d+\.\d+)/g){ say "$1 $2"; } __END__ 10.11.1.0 0.0.0.255 192.168.100.0 0.0.0.255
I copy-and-pasted your regexp.

I don't why you'd use (?:host){0} though, it doesn't add anything.

Replies are listed 'Best First'.
Re^2: Match zero times in regex
by ikegami (Patriarch) on Dec 13, 2011 at 00:41 UTC
    Now try the other example he gave.