Hey guys, as always, stuck again.
I'm trying to sort out some information from a CurrentMedia string using RegExp, but I'm nowhere near good enough at it (or understand it well enough).
code:
XBOXMSGR\0Game\01\0{0}: {1} ({2})\0Xbox 360\0Game Name\0GamerTag\0Web-Link\066262\0\0
code:
ITunes\0Music\01\0{0} - {1}\0Song\0Artist\0Album\0"
Both of these strings are taken from different Media strings by different (yet default MS) apps. Both of them have different numbers of dividers (the "\0") and I think this is where my problems are occurring.
I was trying to use a function to retrive the information, but because I'm unsure how to make each section optional I can't get it to retrieve the final sections without stopping it working.
Lastly (I know, taking liberties now) I'd like to know if there is a way to return multiple values, so that I could set up the function to get the information I need
For example, after running the RegExp, is there a way to return $1, $2, $3, falling back onto $1, $2 if there is no $3 (etc all the way up to the 10 or whatever the value is). The on the other end, to get just the one I want from the function (ie if the function is RunReg(), to do something such as "var variable = RunReg(2) to retrieve the second value?
can anyone help me with any of this? I would be extremely grateful...
Cheers guys
Leroux