Try: $patterns = array( "/<FONT([[:alnum:]]|[[:space:]]|_|\'|\"|=)*>/" , etc
) ; $replace = array( "replacement_string" , etc ) ; $text = preg_replace( $patterns, $replace, $text ) ; Deserves to be tested extensively, though, depending on what you may have in your data HTH Ignatius ____________________________________________ ----- Original Message ----- From: "Leon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 07, 2002 2:53 PM Subject: [PHP-WIN] Eregi_replace for font tags?!? > Hi all > > I would like to know if anyone on this list has a possible solution for > replacing FONT tags in HTML being submitted to a site. > > My idea was to use eregi_replace ... but how do I tell eregi_replace to take > a string that starts with '<font' and ends with '>' and replace it. This is a > variable string of course because of the input and needs to work differently > for different inputs. > > This is for the use of stylesheets.... thus <font class instead of all > others. > > Thanks and Cheers > > > Leon Jansen van Nieuwenhuizen > Personal Computing Services > Information & Communication Technology Services > University of Cape Town > Phone (Work): +27 21 650 3683 > Phone (Cell): +27 82 44 66 743 > Email: [EMAIL PROTECTED] > __________________________ > __________________________ > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php