I have the following code where I am trying to replace assign
with always @(*)
using SED.
Essentially I am trying to ignore the '
in character class but SED still seems to match it. I don't want sed to catch the line if the line contains a '
(My regex is much more complicated than this but I want sed to catch lines which my regex and ignore the lines which match my regex but contain a '
)
echo "assign sample_signal = '0;" | sed '/[^\x27]/ {s/assign/always @(*)/g}'
Result: always @(*) sample_signal = '0;