Thread:LunaBot/@comment-3474542-20130724232809/@comment-4182530-20130726132344

I have a page with | harvestcash     = | harvestcoconut  = | harvestcoin     = 80 | harvestjade     = | harvestother    = I used Find: \|\s*?harvest(cash|coconut|coin|jade|other)\s*?=\s*?(\d+) Replace with: | harvest_curr_type1 = $1 | harvest_curr_amt1 = $2 | harvest$1             = $2 and it returend | harvestcash     = | harvestcoconut  = | harvest_curr_type1 = coin | harvest_curr_amt1 = 80 | harvestcoin     = 80 | harvestjade     = | harvestother    = that is so GREAT!!!

The IF is not needed in this case because we already have the rule that it must contain a number with FIND, I would only need to make a second rule that if there is no digit on any of these it should still add those lines if that is wanted.

Only problem left is if there are more than one currency field filled, maybe I make a rule that after this one it should search for | harvest_curr_type1 = $1 | harvest_curr_amt1 = $2 | harvest$1             = $2 | harvest_curr_type1 = $1 | harvest_curr_amt1 = $2 | harvest$1             = $2 than | harvest_curr_type1 = $1 | harvest_curr_amt1 = $2 | harvest$1             = $2 | harvest_curr_type1 = $1 | harvest_curr_amt1 = $2 | harvest$1             = $2 just don't know if that's so easy. Need to really think about it very well on which cases the "OR" is good and on which not.