in reply to Re^3: Need a regex to replace incomplete html entities
in thread Need a regex to replace incomplete html entities

See what I posted above about the sed command, which is probably not supporting look-ahead assertions..

What do you mean by "without opening the file"? The sed command does open any file it works on, even it this is somewhat hidden from the user. And a Perl one-liner with the -pi.bak -e command-line options would just do the same as sed, hiding the opening file mechanism and doing an in-place replacement.