Search Regex Plugin

Once activated, the settings can be found under Tools.

Source: Post Content. And if you're feeling especially generous, comment author URL and if you're using ComLuv, comment content.

Search pattern:

Replace pattern:

That'll cover all instances of www or non-www to be on the safe side.

If you click "Replace" it'll show you what they look like replaced and you can browse before replacing and saving. "Replace and Save" makes the change permanent.