Thursday, January 24, 2008, 2:16:43 PM, Dominique wrote:
> 1. get the substring enclosed into [@ ... @] markup
> 2. into this substring, replace all occurences of "matched" by "@]matched[@".
> 3. rebuild the resulting string.
Thank you! I managed this now with a preg_match_all
and processing any matching sections individually:
if(preg_match_all("/([EMAIL PROTECTED])($pat)([EMAIL PROTECTED])/".$qi."",
$row, $mb)) {
foreach($mb[0] as $i => $v) {
$mbnew = preg_replace("/($pat)/".$qi."", "@]'''$1'''[@", $mb[0][$i]);
$row = str_replace( $mb[0][$i], $mbnew, $row);
}
}
else
$row = preg_replace("/($pat)/".$qi."","'''$1'''", $row);
Hans
_______________________________________________
pmwiki-devel mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel