Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Modifying muliple matched strings in text

by tybalt89 (Monsignor)
on Jul 12, 2020 at 15:01 UTC ( [id://11119220]=note: print w/replies, xml ) Need Help??


in reply to Modifying muliple matched strings in text

#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11119206 use warnings; my $text = "blah blah [click me](click me) more stuff\nblah [link here +](link here) blah blah"; s!]\(\K.*?\)! '/' . $& =~ tr~ ~-~r !ge for $text; print "$text\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-26 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found