Read Text file with 500 lines

I need to open a text file with 500 lines, and identify how many line have then word "PLAYER" for example.

What is the best way to do this?

You just want the number?

Read the file into a global variable.
Split the global variable at 'PLAYER' using the text split block, and assign it into another variable.
Your answer is length of list(your new variable) - 1

E.g. like this:

You just need to complete the variable with a valid file name.

I need read line by line from the text file, put in a Text and see if there is the word PLAYER.

And take the next 10 characters in front of the word 'PLAYER'.

For example:

PLAYER : Alex
blablablablablablablabla
blablablabla
blablablablablabla
PLAYER : John
blablablabla
blablablabla
PLAYER : Mary

Result : 3 Players, Alex, John, Mary


datatest (2).aia (2.9 KB)

Thanks a lot, works fine !

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.