I have a little problem. I have a server (written in Java) that was returning some links to me to play on my Roku. The server was able to successfully build a link to the mp4 files I was looking for, but they don't work on the Roku. This is because I was grabbing a key from an HTML source via my Java code which is on a server with a different IP than a local user's Roku box. So, the server links won't work. I have to build the links on the Roku itself.
To that end, I recreated this code on the Roku but got stuck. One of the values I need to search for is surrounded by quotes like this: value = "\"value: \"" where backslash would be the escape key in Java. But, in the Roku API docs, I can't seem to find how you search for regex. Can anyone help me with what to use when I'm trying to do:
value = Instr(from_index, string_to_search, "\"value: \"")?
We do have a regular expression component roRegEx if that is what you are looking for. The particular case you are asking about doesn't require a regular expression though.... You just need to include the quote character in your string.
The way you to that is with the Chr(34) function (BrightScript doesn't parse the '\' as an escape character).
search_string = Chr(34)+"value: "+Chr(34) value = Instr(from_index, string_to_search, search_string)