Hi,
I wonder if I can ask for some help again - I need to parse some text which I receive from my Kivor server - It will send me album info for 10 albums at a time, and I need to break this down into individual albums.
The code that I am using is as follows;
var search_name = /<NAME>(((\w|\s|\%|\$|\"|\'|\~|\!|\.|\\|\,|\/|[|]|\(|\))+))</g;
var name_result = full_output[0].match(search_name);
which matches the text after the <NAME> header through to <
The problem I have is that if I omit the 'g' global switch on the end I get everything between the <NAME> and <, but as I want to search multiple times I need the 'g' switch and the output is something like;
<NAME>The Beatles<
I know I can parse this output again, but is there a more elegant way to do this in the original search ?
Any suggestions would be greatly appreciated.
Regards,
Mike.
Last edited by macdonm2 on March 30, 2009 05:47.