I have following content in a file
return o.baseUrl="http://info.example.com/api/v1/",a.init=t,o.login=e(o.baseUrl+"login",{email:"@email",password:"@password"}
I want to replace info.example.com
with api.example.com
Currently I am using
sed -i "s/^info\.example\.com.*$/api.example.com/g" /var/html/www/index.js
But this is not working. I don't know much about regular expression. Can somebody help me on this ?
^
and.*$