btpoole
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2014
05:21 PM
Search Text File For String
I am needing to search a text file and paras a line of text but have been unsuccessful. I have read the sdk for using the different methods like left, right, mid and even the ifRegex but with no positive results. I know the particular string of text but the location in the text file may vary. The text file could contain up to 130 lines. Once I am able to find the particular string I could use the left, right to extract the desired string. Can somebody tell me the easiest way to search the file for string.
Thanks for any help
The file is a tmp file on the roku.
Thanks for any help
The file is a tmp file on the roku.
2 REPLIES 2
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2014
05:59 PM
Re: Search Text File For String
BrightScript Debugger> ? inStr(1, "some really big string coming from a file perhaps", "ring")
19
See 8.5 Instr(start as Integer, text as String, substring as String) as Integer
Also 7.7 ReadAsciiFile(filepath as String) as String
btpoole
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2014
02:31 AM
Re: Search Text File For String
Thanks, was able to locate string with your help using instr.