hoe to capture certain part of the line in file ?
now i have a file that contents below this:
for my problems is i just want to capture the file start from cd .....
until the second "/",which means for first and second line is start from
cd.... until "J973dbs"(whitout the "/") .
and for third line is from cd .... until "XC56311_RevA_R1_5C_H"
(without the "/" ).
i try to use String command like this :
int i = line.indexOf("cd");
int j = line.lastIndexOf("/");
line = line.substring(i,j);
but i notice the result show only "cd /" and i think it is not flexible
cause what i want is always detect from the first character until the last
so do you have any command that i can use ?
by the way ,if slove for the first question,how can i detect the last
string after the last "/" ?
thanks a lot.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center