sed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

& commercial replace problems


From: Mickael MONSIEUR
Subject: & commercial replace problems
Date: Tue, 21 Mar 2017 11:11:35 +0100

Hi,

I have a problem with the replace when a "&" commercial is present.
Because "&" it is used in URL.  (page.php?hello=world&john=doe)

Example:

echo "<apikey>" > test
APIKEY="test&test&test"
sed  -i -e "s/<apikey>/$APIKEY/g" test
cat test
rm test

Result:

address@hidden:/tmp# ./test.sh
test<apikey>test<apikey>test

The replacement text (search) should not be totally insensitive to regular expressions?

Best regards,
Mickael

reply via email to

[Prev in Thread] Current Thread [Next in Thread]