in reply to regex search valid only if registers n and n+1 are equal?

Another possible solution can be:
while (<DATA>) { print "match on $1 and no 2nd$2\n" if /\S+ (\d+) \S+ (?:\d+)/; }


Replies are listed 'Best First'.
Re^2: regex search valid only if registers n and n+1 are equal?
by ikegami (Patriarch) on Jul 01, 2006 at 04:19 UTC
    I get two prints (as expected) for the provided data. It should only print the first line. Perhaps you didn't understand the question?