SyntaxFix
Write A Post
Hire A Developer
Questions
Use \b for word boundaries:
\b
sed -i 's/\boldtext\b/newtext/g' <file>