are you using two single quotes when you want a double quote? also you should probably be using str_replace for this since there's no regular expressions here.
On Fri, 02 Nov 2001 22:26:07 +0100, Ben Edwards wrote: >Have a regular expression which replaces ' with '' (used to insert ' >into db): > preg_replace("/\'/", "''", $text ); >This works great on the UNIX production machine but not on windows >development environment. Actually replaces ' with \'' not ''. > >Before I write a function that loops thought the whole thing looking >at >each character and replaces ' with '' has anybody got any ideas? > >Ben > >************************************************************** >* Ben Edwards +352 091 429995 * >* Homepage http://www.gifford.co.uk/~bedwards * >* i-Contact Progressive Video http://www.videonetwork.org * >* Smashing the Corporate image http://www.subvertise.org * >* Bristol's radical news http://www.bristle.co.uk * >* PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * >************************************************************** > > -- Mark, [EMAIL PROTECTED] on 11/02/2001 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]