johnwayne77 Posted February 16, 2007 Share Posted February 16, 2007 i was wondering what this line does: $src = ereg_replace('<font color="([^"]*)">', '<span style="color: \1">', ob_get_contents()); the dilema is on the <font color="([^"]*)"> part. does that refers to replacing a predefined number of characters in the brackets? i would appreciate an explanation on the entire syntx and more on the "^" and "*" options. thanks Link to comment https://forums.phpfreaks.com/topic/38745-ereg_replace-question-replace-a-predefined-number-of-characters/ Share on other sites More sharing options...
effigy Posted February 16, 2007 Share Posted February 16, 2007 ( ### Start capture [^"]* ### Match any character that is not a double quote 0 or more times. ) ### End capture The [ ]'s indicate a character class. See the links in my signature for more information. Link to comment https://forums.phpfreaks.com/topic/38745-ereg_replace-question-replace-a-predefined-number-of-characters/#findComment-186330 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.