thanks my king :)

it works !!!

"Adrian Ciutureanu" <[EMAIL PROTECTED]> schreef in bericht
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
<?
$s = 'somthing opentag1 .........any content in between
............. closetag1 somthing else';
$opentag = 'opentag1';
$closetag = 'closetag1';
$other_content = 'the other content';
$content = ereg_replace(".*$opentag", '',
ereg_replace("$closetag.*", '', $s));
$new_str = ereg_replace("$opentag.*$closetag", "$opentag
$other_content $closetag", $s);
// $content = ' .........any content in between .............. ';
// $new_str = 'somthing opentag1 the other content closetag1 somthing
else'
?>
$content = '<?=$content?>';<br>
$new_str = '<?=$new_str?>'

> -----Original Message-----
> From: Jeroen Olthof [mailto:[EMAIL PROTECTED]]
> Sent: 17 iulie 2001 17:38
> To: [EMAIL PROTECTED]
> Subject: [PHP] regexp. king needed (is it possible ???)
>
>
> ereg_replace("$opentag([^*]*)$closetag",
> $this->OPENTAG.$loopHandle.$this->CLOSETAG, $template);
>
> how do I get al hold on the "\\1" part of the replacement.
> basicly I want to replace
>
> opentag1 .........any content in between .............. closetag1
>
> with
>
> opentag2 onewordonly closetag2
>
> but still need the
>
> .........any content in between ..............
>
> is this possible in some way ???
>
> kind regards
> Jeroen Olthof
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to