[[:>:]] are tokens that MacOS’s
sed inteprets as directional word-boundaries : the first one lets you check you’re matching at the start of a word and the second at the end of a word.
Those let you make sure you’re replacing whole words rather than parts of words (e.g. avoiding to change
confessor when you’re trying to replace
The exact equivalent in GNU sed would be
However, as someone familiar with regex but not necessarily with the bazillion different implementations, I would suggest you use the more common
\b instead of both
It’s a direction-less word boundary which will match if you’re either at the start or the end of a word. It will produce the exact same result in your case (and in most cases) and future maintainers will be more likely to be familiar with it and not go through the struggle you just experienced.
CLICK HERE to find out more related problems solutions.