I need to use sed to replace a sequence of characters in the text only if that sequence of characters belongs to the quoted string.
eg. following text:
This is a YouTube video referenced by the 'movies.YouTube_id' column.
should be converted as follows:
This is a YouTube video referenced by the 'movies.you_tube_id' column.
i.e. replacing the substring "YouTube" with "you_tube" only if such a substring is part of a string enclosed in single quotes ('), regardless of leading and / or trailing characters enclosed in quotation marks.
Obviously
sed -r "s/YouTube/you_tube/g"
, "YouTube" "you_tube" , . ?
.