in reply to Re: search and replace pattern inside file not working as expected
in thread search and replace pattern inside file not working as expected

Yes. You are right. It would match any, but not the "string" of the uppercases "ARTEC" which is not what i wanted. I "tested" it by putting print statements into the loops now. It works with the new pattern. But i made another mistake the variable needs to be assigned "globally" outside the while loop or my next if block never gets executed. Any hint? ... How could i declare the variable to work outside the loop my and local wont do ...?


Thanks
MH

  • Comment on Re^2: search and replace pattern inside file not working as expected