Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Replacing a specfied instance of a pattern in a string

by ikegami (Pope)
on Jul 14, 2005 at 22:48 UTC ( #475077=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $str      = 'Fsih my test variable is fsihd or is it gfsih or gfsih
    +d fsih';
    #                                        1111            2222     3333
    +  4444
    ...
    $str =~ s/\G(.*?)$regexp/$1$replace/;
    
    print("$str\n");
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (13)
As of 2014-07-30 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (234 votes), past polls