As per sed whole word search and replace I have tried the following.
OS: HP-UX B.11.31 U ia64
$ echo "bar bar2 embarassment" | sed "s/\<bar\>/test/g"
bar bar2 embarassment
$ echo "bar bar2 embarassment" | sed "s/\b[bar]\b/test/g"
bar bar2 embarassment
$ echo "bar bar2 embarassment" | sed "s/\[[:<:]]bar[[:<:]]\/test/g"
sed: Function s/\[[:<:]]bar[[:<:]]\/test/g cannot be parsed.
$ echo "bar bar2 embarassment" | sed "s/bar/test/g"
test test2 embraassment
None of the above are helping me to match the exact values.
Note: I can't install GNU sed
since I don't have permission to do so.