while ($txt =~ /constant=(\w+@\w+\.\w+)/g) { print "==> match starts at $-[0]!!!\n"; print "$1\n"; }