The s/// command in sed allows you to use other characters instead of / as the delimiter, as in sed 's#"http://www.fubar.com"#URL_FUBAR#g' or sed 's,"http://www.fubar.com",URL_FUBAR,g'