Pattern Matching / Formatting

From: Date: Mon, 16 Oct 2000 21:10:48 +0000
Subject: Pattern Matching / Formatting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-20461@lists.php.net to get a copy of this message
Greetings all, Looking for a way to search for all instances of the following pattern: snip>>> end of a sentence in a paragraph. Headline Beginning of text in the next paragraph. Etc. Etc. Etc. <<<end snip where it looks like this to probably ereg_replace. snip>>> end of a sentence in a paragraph.LINE_BREAK BLANK_LINE-LINE_BREAK HeadlineLINE_BREAK BLANK_LINE-LINE_BREAK Beginning of text in the next paragraph. Etc. Etc. Etc. <<<end snip I want to make what's in Headling bold and that could be any pattern of letters, numbers, etc. Thought one of you may have developed something that will do this. Something like this: $formatted_variable = ereg_repace("*\n\w\n","*\n\w\n<b>",$variable); $formatted_variable = ereg_repace("\n\w\n*","<\b>\n\w\n*",$variable); Thanks in advance, Dan

« previous php.general (#20461) next »