in reply to Re: Search and replace
in thread Search and replace

Hi Hippo ,

I want to change the string to output when the string clk matches not the input to output

Can you provide me good tutorial for reg expression ?

Replies are listed 'Best First'.
Re^3: Search and replace
by hippo (Archbishop) on May 23, 2021 at 16:10 UTC
Re^3: Search and replace
by tybalt89 (Monsignor) on May 23, 2021 at 16:09 UTC
    $line =~ s/input(?= .*clk)/output/g;

    Untested since no test cases were provided.