Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Replacing 3 and 4 digit numbers.

by Discipulus (Canon)
on Apr 08, 2016 at 08:02 UTC ( [id://1159902]=note: print w/replies, xml ) Need Help??


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 } ...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1159902]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-24 05:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found