Sebastian Janisch wrote:Are you positive your regular expression that you pass as the search needle is correct ?
No I'm not positive at all but I think so, I had it work before on its own and it seemed to be alright.
Do you get any exceptions/errors? Check if system is able to locate the files and directory.
And is lines 59 and 60 necessary?
No They dont need to be there anymore.
I dont get any exceptions for some of the paths I'm using and it accepts string(directory) as input, returns true, asks for string input, returns a number (not the number of times the
word was counted) and continues repeating that, enter string etc, until it ends. None of the numbers printed out correspond with the correct results. I'm not sure what the program is counting for me but it doesnt seem to be what I want
For another path I try, I get a fileNotFount error (the system cannot find the file specified), with the names of the files in the particular directory, which is odd if it cant find them !
The overall program when its finished should actually start a
thread for each file in the specified directory, that counts the number of times the specified string occured.
I thought that maybe I could get it working without threads for a start and then try implementing them. Is this a bad idea?
Thanks for your help guys