mf22cs
05-29-2003, 07:06 AM
Hi,
I would like to know if there is a way of checking if a string is found in a textfile.
Exemple:
--- file.txt ---
oldtest@domain.com
newtest@domain.com
best@domain.com
--- end ---
Then i want to know if a specific line is found in that file... exemple:
best@domain.com shall return true
test@domain.com shall return false
-----------------------
Later on the action is to include/exclude lines in that file. But include shall only work IF the test is false, and vice versa. But that part is not part of the question... but if someone know how to do that I will not flame him/her for sharing there knowing on that part. :D
-----------------------
Thanx in advance!
/Marcus
I would like to know if there is a way of checking if a string is found in a textfile.
Exemple:
--- file.txt ---
oldtest@domain.com
newtest@domain.com
best@domain.com
--- end ---
Then i want to know if a specific line is found in that file... exemple:
best@domain.com shall return true
test@domain.com shall return false
-----------------------
Later on the action is to include/exclude lines in that file. But include shall only work IF the test is false, and vice versa. But that part is not part of the question... but if someone know how to do that I will not flame him/her for sharing there knowing on that part. :D
-----------------------
Thanx in advance!
/Marcus