On Wed, January 3, 2007 11:51 am, Dotan Cohen wrote: > I have many email address that are stored like this: > "=?UTF-8?B?15jXqNeR15XXp9eZ16DXlCDXnteo15nXkNeg15Q=?=" > <[EMAIL PROTECTED]>, > "×× ×¦× ×ר××" <[EMAIL PROTECTED]>, > "×× ×¤×××× ×" <[EMAIL PROTECTED]> > > I'm trying to run a script that will leave the file as so: > [EMAIL PROTECTED], > [EMAIL PROTECTED], > [EMAIL PROTECTED] > > The first step is to remove the UTF-8 names. This code _doesn't_ work, > but I think that it should: > $text=preg_replace('/\"=\?UTF\-8\?B\?([a-z0-9]+)\?=\"/i', '', $text); > > I've tried with single and double quotes, and I've tried backslashing > and not backslashing the question marks. Where am I erring? Thanks.
Instead of trying to strip the UTF stuff out, try to capture the part you want: preg_match_all('|<[^>]>|ms', $emails, $output); var_dump($output); -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php