-1
down vote
favorite
I searched for a long time but didnt find a way to count the number of files in a
string, which i get from reading the contents of a rar file (list of filenames and folders) seperated in lines.
Example for the String:
As you can see only item 1,2,3 are files and item 4,5 are folders. I want to count only the number of files (in this case 3).
I suppose i should count the lines in the string which contain a "." before an "\" [the String should be scanned from right to left] and put the value into a int variable? [is there a library or method which can do that?].
[I dont need to adress the exception where a file has no . in it]