foo@bar.org ()
format. It was submitted by "Kurt Yoder" <kylist@shcorp.com>
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2118
7612ce4b-ef26-0410-bec9-
ea0150e637f0
$string = ereg_replace ('"', '', $regs[1] );
}
elseif ( ereg('\((.*)\)', $string, $regs) ) {
- $string = $regs[1];
+ if( ( $regs[1] == '' ) || ( $regs[1] == ' ' ) ){
+ if ( ereg('^(.+) \(', $string, $regs) ) {
+ $string = ereg_replace( ' \(\)$', '', $string );
+ } else {
+ $string = ' ';
+ }
+ } else {
+ $string = $regs[1];
+ }
}
else {
$string = sqimap_find_email($string);