[pmwiki-devel] $12.50 -> .50 var problem
J. Meijer
commentgg at hotmail.com
Mon Apr 9 14:06:47 CDT 2007
Caveman, if your problem is some $ appearing in a regex, I think you're going too fast and I will revoke your license to access the internet freely. Then it's the end of line/string for you to match. No more dollars to do that for you!
I humbly request that, if this be the case, you, having retrieved them missing $12, transfer them to me.
Is this a regular enough an expression for you?
/jm
On 4/9/07, The Editor wrote:
The following is causing me huge problems. Been working on it for
hours--and seem to have finally narrowed it down to here...
if (strpos($newpage[text], "(:$ff: ") == true) $newpage['text'] = preg_replace(
'/\\(:'.$ff.': (.*?):\\)/s', "(:$ff: $v:)", $newpage['text'], 1);
It's part of a routine that checks to tell if a certain (hidden) text
variable exists and if it does, it replaces the current value with the
new value ($v).
All works fine generally--except when $v has a $ in it it thinks its a
variable that doesn't exist. So $12.50 gets changed to .50. And that
throws me off.
Can anyone suggest a fix for this bedeviling little bug...
Cheers,
Dan
PS. I'm pretty sure $ff and $v are the correct values going into this
process. Just missing the $12!
_______________________________________________
pmwiki-devel mailing list
pmwiki-devel at pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
_________________________________________________________________
It’s tax season, make sure to follow these few simple tips
http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=WLMartagline
More information about the pmwiki-devel
mailing list