in reply to Perl substitute with the nth match
I want a substitution with a Perlvar of the nth match, if one exists?
If I understand your question correctly, then no, no such perlvar that keeps track of "how many" regexes have been executed/replaced exists, and you'll have to use one of the other methods you described. Update: Or the clever hack by choroba.
|
|---|