OK, thanks alot its working now
Only one problem... after doing alot of regex
Code:
$out =~ s/<\?xml[^>]+?>//ig; #gets rid of <?xml*?>
$out =~ s/<\![^>]+>//ig; #gets rid of <!*>
$out =~ s/<\!\-\-[^>]+\-\->//ig; #gets rid of <!--*-->
$out =~ s/<folder\-listing version="1.0">//ig; #gets rid of <folder-listing version=\"1.0\">
$out =~ s/<folder name="//ig;
$out =~ s/"\/>//ig;
$out =~ s/<\/[^>]+>//ig;
I get what I want plus tonnes of newline characters. The thing that I want is indented also.
Code:
Pictures
Sounds
Themes
Videos
Other
I want to get rid of the indentations, I want to remove the new lines above and below the list, and substitute the new lines within the list with a comma like so:
Code:
Pictures,Sounds,Themes,Videos,Other
I have tried the following:
Code:
while ($out =~ m/\t/) {
$out =~ s/\t//;
}
while ($out =~ m/^+\n/){
$out =~ s/^+\n//;
}
while ($out =~ m/\n+$/){
$out =~ s/\n+$//;
}
while ($out =~ m/\n/) {
$out =~ s/\n/\,/;
}
but I end up with no output :/ I do know, however that
Code:
while ($out =~ m/\t/) {
$out =~ s/\t//;
}
does work on its own. Any of the Newline regexes just turn the output to nothing on their own.
I have tried googling the problem, but to no avail...
Please help
[edit]
after talking to some guys on IRC, and doing a bit of fiddling, I now have it working. Thanks anyway