D
Devon_Dan
First, thanks for taking the time to read this post. I have spent a
while trying to make this work but to no avail and I cant find a post
that explains it. Your time is appreciated.
Now I have a text file with a large amount of XML data in it. I am
trying to extract everything between <Folder>...</Folder> tags. These
extend over a number of lines and there are an undefined number of
these folders in the file. I would like the contents of each of the
folders to be assigned to a either a new variable or part of an array.
Something like:
$result[1] = "contents of folder one";
$result[2] = "contents of folder two"; etc...
I have the contents of the text file as a single variable $content and
I think I have the right regular expression to match the first folder:
$content =~ m/<(F|f)older>t.*?<\/(F|f)older>//s
Still I am unsure how to loop through and collect each of the
instances.
Any tips or hints? Perhaps its a basic hole in my understanding and
someone can even recommend a good tutorial/article that explains it?
Thanks
Dan
while trying to make this work but to no avail and I cant find a post
that explains it. Your time is appreciated.
Now I have a text file with a large amount of XML data in it. I am
trying to extract everything between <Folder>...</Folder> tags. These
extend over a number of lines and there are an undefined number of
these folders in the file. I would like the contents of each of the
folders to be assigned to a either a new variable or part of an array.
Something like:
$result[1] = "contents of folder one";
$result[2] = "contents of folder two"; etc...
I have the contents of the text file as a single variable $content and
I think I have the right regular expression to match the first folder:
$content =~ m/<(F|f)older>t.*?<\/(F|f)older>//s
Still I am unsure how to loop through and collect each of the
instances.
Any tips or hints? Perhaps its a basic hole in my understanding and
someone can even recommend a good tutorial/article that explains it?
Thanks
Dan