java how to split string from the Value1 + value2 = Value3 -


i want split value1 , value2 string value1 + value2 = value3(which retrieving excel). don't required value3 string. can 1 please answer.

object[] caliculation = readcalitable.readexcelbycolname("calculations");     (int = 0; < caliculation.length; i++) {         system.out.println(caliculation[i]);         string[] firstvalue = caliculation[i].tostring().split("\\+"); 

try this:

string[] values = caliculation[i].tostring().split("[+=]"); 

this split 3 values array of 3 elements...

values[0] // value1 values[1] // value2 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -