I am trying to migrate a fairly large and rather old database, one of the columns consists of file names. The problem is that there can be several file names in this one field, separated by a space. For instance:
"Filename.mp3 file anem.mid fi le nam e.rm"
I tried to break this line with preg_split(), the closest regex I could find was
/(?<=\.[\w]{3})(\s)/
I know that /(?<=\.[\w]+)(\s)/it will not work, since in PCRE the lookbehind must have a fixed width. And since this is a music database, there are unconventional extensions.
Any suggestions?
source
share