[SOLVED]RegExp for {%download=[INSERT]%}
Posted: Mon Sep 06, 2004 12:38 pm
I've tried to create a regular expression which should replace the following:
Here's what I currently have:
but it doesn't work, i get this as the result:
it should result in:
Thanks in advance
into:{%download=img%}
{$res['id']} should be the contents of $res['id'] (right now set as 4 for example)./p/dl/\\1={$res['id']}
Here's what I currently have:
Code: Select all
<?php
$inc_out = preg_replace ("/\{%download=(.*)%\}/", "/p/dl/\\1={$res['id']}", $inc_out);
?>Code: Select all
/p/dl/img%}Code: Select all
/p/dl/img=4