# [EMAIL PROTECTED] / 2007-01-03 19:51:56 +0200: > I have many email address that are stored like this: > "=?UTF-8?B?15jXqNeR15XXp9eZ16DXlCDXnteo15nXkNeg15Q=?=" <[EMAIL PROTECTED]>, > "=?UTF-8?B?15nXoNem158g157XqNeZ15Q=?=" <[EMAIL PROTECTED]>, > "=?UTF-8?B?15zXmSDXpNeV15zXmdeg15Q=?=" <[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.
You should not "try backslashing and not backslashing". Read the documentation instaed, it's clear. In the meantime, this will work: sed 's/^.*<\([^>]\+\)>,$/\1/' file -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php