The following command:
echo "/tmp/ansible_gN946Q/chronograf-1.4.0.1-1/etc/blue" | sed 's/(((chronograf|influxdb|kapacitor).[0-9\.-]*\/)|telegraf\/)/aefgae/g'
Outputs:
/tmp/ansible_gN946Q/chronograf-1.4.0.1-1/etc/blue
When the expected output is:
/tmp/ansible_gN946Q/aefgaeetc/blue
This is strange because it replaces fine in PCRE, which sed
should be compatible with, correct me if I am wrong.
Hope someone can point out my error in the sed
command above.