regular expressions and folder object
so i currently am making a patch where i am loading sound file names from a folder using the folder object to a ftm matrix. the sound files are named and organized with two parts describing the sound: the first part names an age (like "boy" or "woman", etc.), and the second part names a mood (like "happy", "sad", etc.). the two parts are separated with a dash "-". i was wondering if it’d be possible to split the string of the file names in the list (using a zl command, or using zl to split the list and send the names to the objects performing the separation), so that i could store the various parts of the filename in separate columns of the ftm matrix. anyone know if this is possible? thanks.
Try [regexp - @substitute " "] which will turn the -hyphens- into spaces so it will output a list.
that’s exactly it! thanks.
hm… i don’t know regexps, so i don’t know what [- @substitue " "] should be written as. any help?
Here’s an example.
----------begin_max5_patcher---------- 433.3ocwT1saCBBEG+Z8ofv0ZSQkV6tZ64XqYAUZKKJXDL00l9tOAs1Oxpy9 w1RTIbNv47meb7r01BFIpnRH3Ivq.Kqs1VVFSZCVsysfYjp3ThzrLXFUJIKo PmFehRUJUo9Lm1DDHDLu00BAWIYaLNPdiF2ZlWlw306wDNuVi4DU7JFe46Ez XUSjP958.PHrY.GXFBGMtKArDihDQe3hPvixJmjYxJ7kBFIEdHwMp0jYj13N aa8GmAd1WjJpCxEO50tIJnC.FQ3KuNNftLGlNybv8mnGl3q+5M96ovrqEBd2 .D3z004Ze7TzJiNgaRAb0Jf+kKLbdfEGsPAYJJBl0GTv+iPoftjVkCbAOKKi jJlpTQAuAqe5GSG+9XqiBaqll1Gx7uVjguAjcVijNlI3TW0Zgq+HT.B6tPTV 3hckrpe+VNMHZRChBB6qgi28zuwDPXJiedqWilz1OkaxZFDu+z1dAANHqDZc oEmnXB9QqQ2RDf5VzJVRB03eOUxXI4BFW0pgvvQX8uTHSkwzIcy.y+1a2gpU 7.z5rSVyOJ06TQCgd3+TE4M.E4eGJpdxN6u.a.QzJC -----------end_max5_patcher-----------