Clear questions and runnable code
get the best and fastest answer
Replace a string that contains special charactersby Sonya777 (Novice)
|on Mar 21, 2017 at 15:54 UTC||Need Help??|
Sonya777 has asked for the
wisdom of the Perl Monks concerning the following question:
I need help with an edit of a .txt file. I want to replace a part of the string with an empty space (i.e. remove the part of the string).
I have many lines like this one:
And from this line I want to remove the bolded string. To do this for many lines, basically I need to remove a part of the string that starts with:
(this is the "common" part for each line, since the date is different for each line)
The problem is that the string contains special characters like ",:,} and a simple search & replace script does not work:
Do you have any idea how this can be done?
Thanks a lot!