Page 1 of 1

removing parts of a string

Posted: Mon Nov 24, 2008 7:04 pm
by qbasicfreak
How do you remove choice parts of a string.

For my chat program the program has to search each individual line for a specific word.
If the line is the one it wants it then has to be able to remove the letters before the comma and the comma itself.

example:
*the user entered the word hello
*the program searches through the text file and finds the right phrase
hello,how are you?
*it has to remove the hello and the comma.

thanks

Posted: Mon Nov 24, 2008 11:40 pm
by burger2227
Why do you need to remove text from the file?

You would have to make a temp file of the original and edit the line where hello, is found. Then copy the updated file back to the original.

INSTR and MID$ would still work for you in the program.

Ted