in reply to Re: Replacing 3 and 4 digit numbers.
in thread Replacing 3 and 4 digit numbers.

$text =~ s{ $url (*SKIP) (*FAIL) | ($digits_3_4) }
wow! perlre is defintively an unxplored (by me) continent! thanks AnomalousMonk

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^3: Replacing 3 and 4 digit numbers.
by Anonymous Monk on Apr 08, 2016 at 08:51 UTC

    :D "old style" that is backwards compatible

    s{ (...) | (...) | ... }{ RepReplace($1,$2,$3); }ge; sub RepReplace { my( $link, $dig3, $num4 ) = @_; if( defined $link ){ return $link; ### change nothing } ...