I\'m working on some old code and I found that I used to use
sed -E \'s/findText/replaceWith/g\' #findText would contain a regex
but I no
From source code, -E
is an undocumented option for compatibility with BSD sed.
/* Undocumented, for compatibility with BSD sed. */
case 'E':
case 'r':
if (extended_regexp_flags)
usage(4);
extended_regexp_flags = REG_EXTENDED;
break;
And from manual, -E
in BSD sed is used to support extended regular expressions.