Reputation: 518
I want to replace below line with next line in all the files. So what sed
pattern is used for this. I have tried lot but not figured that out..
checkToken($token['token'])
checkToken($token)
This is what I have tried
sed -i -- 's/checkToken\(\$token\['token'\]\)/checkToken\(\$token\)/g' get_officers_v2.php
Upvotes: 0
Views: 62
Reputation: 4395
You just need to get your escape-characters (\
) on the right place like:
sed -ie "s/\(checkToken(\$token\)\['token'\])/\1)/" get_officers_v2.php
Upvotes: 1