in reply to Re^6: extracting a substring from a string - multiple variables
in thread extracting a substring from a string - multiple variables

walinsky
Wouldn't something like that be possible; that would also leave out the implication that there's just one <file/></file> pair

To make the problem clearer:

The only chance I'd see here would be to advance to the start of data, extract the data by substr($string, pos($string), $length) and update the string's pos($string) behind the data: pos($string) += $length. At that point, it could be checked for the expected ending tag </file>. All this happens in a while loop under /g until no more <file> blocks can be found.

Could the above text describe problem and solution?

Regards

mwa