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'
The double quotes are not a problem. For matching single quotes, switch the two types of quotes around. Note that a single quoted string may not contain single quotes (not even escaped ones).
The dots need to be escaped if sed
is to interpret them as literal dots and not as the regular expression pattern .
which matches any one character.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…