I don't like the idea of parsing serialized data using regular expressions. I did some tests and it seemed that serialized PHP arrays is already the fastest serialization technique (compared to things like JSON). However I can imagine that something like
title The title
relation:references value1 value2 value3
etc. could work better and could be easily parsed, also outside DokuWiki. We should also think about some good escaping or even again using serialization for the values if they shouldn't be as "clean" as the examples above. I'll look into this again after the upcoming release as now we are already in feature freeze.
For now I recommend using the metadata index (see
http://www.dokuwiki.org/devel:metadata#metadata_index), it does already exist for the titles so it should be as easy as reading two files and merging them into one array for getting the titles of all pages in the wiki.