Use backreferences, like this:
while (<DATA>) { print "match on $1\n" if /^\S+ (\d+) \S+ \1$/; } __DATA__ foo 1000 bar 1000 foo 1000 bar 500
--
David Serrano
In reply to Re: regex search valid only if registers n and n+1 are equal?
by Hue-Bond
in thread regex search valid only if registers n and n+1 are equal?
by Voronich
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |