On 4/10/07, J. Meijer <[EMAIL PROTECTED]> wrote:
>
> Jason is right.
>
> $v = preg_replace('/\$[0-9]/', '\\\\$0', $v);
>
> Should work. $12 to him.
>
> To also protect against \\12.50in your data the best I can do is follows.
Are you saying the preg_quote command will corrumpt the above data?
> if (strpos($newpage['text'], "(:$ff: ") !== false) # not needed at all,
> complicates your code (Kathryn is your friend)
> $newpage['text'] = preg_replace("/\\(:$ff: (.*?):\\)/s", "(:$ff: $v:)",
> $newpage['text'], 1);
actually I need the if because the next line is an else that depends
on the condition failing. Just the same, Kathryn has indeed been a
big help...
Cheers,
Dan
_______________________________________________
pmwiki-devel mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel