regular expression search replace
I have been working the whole day on a one-liner that can do a search replace.. No results jet...
What I need to do:
I have a datafile called data.txt
the content of the datafile:
And so on. There are 28 lines in the file.
Now I want to change the line that begins with "1?" to "1? Has left the company."
It should be a oneliner that will be called from a batch script.
perl -p -i -e "s/search/replace" "data.txt"
Does anyone have an idea.. I came up with several variations but ether nothing got replaced or 1 and 10 and 11, etc got replaced.
Any help would be most welcome.
Re: regular expression search replace
Are you looking for this.
1? Has left the company. john
|All times are GMT +5.5. The time now is 03:34.|