That is easily done with grep.
Here is a Script BASIC example of searching the War and Peace text file version (3.2 meg file) for Prince.
OPEN "warpeace.txt" FOR INPUT AS 1
flen = FILELEN("warpeace.txt")
fstr = INPUT(flen, 1)
SPLITA fstr BY chr(10) to farr
lnum = 1
FOR idx = 0 to UBOUND(farr)
IF CHOMP(farr[idx]) > "" AND farr[idx] LIKE "*Prince*" THEN PRINT FORMAT("%~[000000] ~", lnum), farr[idx],"\n"
lnum += 1
NEXT
jrs@jrs-laptop:~/sb/examples/test$ time scriba findit.sb > results.findit
real 0m0.473s
user 0m0.448s
sys 0m0.028s
jrs@jrs-laptop:~/sb/examples/test$ ls -l warpeace.txt
-rw-rw-r-- 1 jrs jrs 3202941 Aug 29 2017 warpeace.txt
jrs@jrs-laptop:~/sb/examples/test$ tail -n 20 results.findit
[062743] flight from it, the death of Prince Andrew, Natasha's despair, Petya's
[062871] At the beginning of winter Princess Mary came to Moscow. From
[062876] "I never expected anything else of him," said Princess Mary to
[062951] by Nicholas, Princess Mary confessed to herself that she had been
[062999] "Good-by, Princess!" said he.
[063012] "Yes, Princess," said Nicholas at last with a sad smile, "it doesn't
[063042] why. "Thank you, Princess," he added softly. "Sometimes it is hard."
[063044] "So that's why! That's why!" a voice whispered in Princess Mary's
[063065] "Princess, for God's sake!" he exclaimed, trying to stop her.
[063066] "Princess!"
[063079] In the winter of 1813 Nicholas married Princess Mary and moved to
[063313] and Sonya, blaming himself and commending her. He had asked Princess
[063649] when she and Countess Mary spoke of Prince Andrew (she never mentioned
[063650] him to her husband, who she imagined was jealous of Prince Andrew's
[063837] Rostovs he had received a letter from Prince Theodore, asking him to
[063962] "And have you talked everything well over with Prince Theodore?" she
[064250] questions as to whether Prince Vasili had aged and whether Countess
[064297] translate things into his mother's language, "Prince Alexander
[064305] "Well, and how is Prince Alexander to blame? He is a most
[064479] his brows. "Prince Theodore and all those. To encourage culture and
jrs@jrs-laptop:~/sb/examples/test$