[pmwiki-devel] FW: $12.50 -> .50 var problem

Jason Frisvold xenophage0 at gmail.com
Tue Apr 10 10:42:57 CDT 2007


On 4/10/07, J. Meijer <commentgg at hotmail.com> wrote:
> Jason is right.

Cool!  Score one for me!

>   $v = preg_replace('/\$[0-9]/', '\\\\$0', $v);
>
> Should work. $12 to him.

Excellent.  You can send payment to my paypal account...  *grin*

> if (strpos($newpage['text'], "(:$ff: ") !== false)  # not needed at all,
> complicates your code (Kathryn is your friend)

Err..  Who's Kathryn?

I agree, though..  This check pretty much doubles the number of cycles
needed to run this particular piece of code anyways since you're
effectively parsing the string twice.  Might as well just check every
string and be done with it.

-- 
Jason 'XenoPhage' Frisvold
XenoPhage0 at gmail.com
http://blog.godshell.com



More information about the pmwiki-devel mailing list