From: Judas Magnus on
I've been trying to find a way to search for a name in a text file. Also lets say the text file has a short story inside so you guys know what the text file is.

When I use regexp(B,'Pizza') , where B is the array created with cellstr. I get the result where Pizza occurs throughout the array.

+However I want to make a counter where it counts the occurrences when Pizza comes in.

(1st way)
So thinking of counter of course I would try doing a for loop!

I tried doing a for loop but if I do

if regexp(B,'Pizza')

I get

Conversion to logical from cell is not possible.

/////
(2nd Way)
If a try to convert it to a char array since it tells me i need to do that in order to use the findstr function.

However when i do findstr(test,'Pizza')
I get the error Input strings must have one row.
From: Judas Magnus on
all solved i appreciate the help i got along this