I have an expression of for "1+2-4*5+0.9+10.5+…" in string format and I want to split it into an array so that every number from the second one onwards in the expression is paired with the math operation before it. (i.e. ["+2","-4","5,…]). I have attempted using regex /[-+*/][0-9]+|[-+*/][.0-9]+|[-+*/][0-9]+\.[0-9]+/g
and am succeeding in spitting whole numbers but anything after a decimal point is not captured (see attached code snippet). How do I modify the last part of the regex (i.e. [-+/][0-9]+.[0-9]+) so that it works properly for all decimal fraction?
expression="5-0.23+.65+.9+0.5+10.5";
const numArr=expression.match(/[-+*/][0-9]+|[-+*/][.0-9]+|[-+*/][0-9]+\.[0-9]+/g);
console.log(numArr);
console.log("As you can see the regex is failing to capture decimals unless they start with a period(.)")
accutane price in mexico – order accutane online canada accutane canada pharmacy
cost of ivermectin lotion – cost for ivermectin 3mg stromectol canada
lyrica medication – fastphapl my canadian pharmacy review
cialis 800 mg – order cialis from canada tadalafil 20 mg buy
stromectol 2mg online – ivermectin 50mg/ml ivermectin 250ml
modafinil and caffeine – provigil for adhd provigil 200mg
lasix prescription – over the counter lasix pills buy lasixonline
average cost for cialis – cialis coupon cvs how much is cialis daily
ivermectin 0.5% – ivermectin without prescription stromectol human
legitimate online slots for money – hard rock casino online casino games win real money
free samples of ed pills – mens ed pills best ed medication
brand name drug prednisone – purchase prednisone canada prednisone prescription drug
buy real viagra online cheap – buy cheap viagra online australia drugstore viagra
cialis 10mg tablet – Cialis prices medication canadian pharmacy
ivermectin 12mg online – ivermectin buy australia ivermectin uk
non prescription ed drugs – ed products medications for ed
ivermectin lice oral – cost stromectol order stromectol
low cost viagra – viagra 25mg buying sildenafil 100mg
803906 510024Respect to post author, some wonderful info . 223492
purchase sildalis online – cheap propecia glucophage 1000mg for sale
sildenafil next day delivery – cheap sildenafil pills tadalafil price
acheter 200mg gГ©nГ©rique sildenafil en france – sildenafil 200mg bestellen cialis generique pas cher
ivermectin 3mg for people – buy stromectol pills cost of ivermectin 1% cream
prednisone 20mg cost – canadian pharmacy online buy prednisone 5mg online cheap
https://cialiswbtc.com/ tadalafil without a doctor prescription
zanaflex canada – buy fluoxetine buy colchicine 0.5mg pills
buy cialis where to buy cialis without prescription
where to buy tadalafil on line tadalafil cost in canada
https://cialismat.com/ where to buy tadalafil on line
oral propranolol – propranolol usa plaquenil online order
cost of cialis tadalafil drug