I'm using CS3 and in code view I searched for ' and replaced with ' which worked fine for me.
I had none of the check boxes ticked and used Source Code as the place to search make sure its not set to text.
Find in: Current Document
Search: Source Code
Options: All unchecked.
replace and replace all both worked fine
you might also want to check the "Code Rewriting" section of your preferences and try some of the settings there.