Hi Kem and other RegEx wizards - he’s baaaack!
I’ve been working through manually creating an expression (and with RegExRx) for dealing with file paths and can’t seem to get a handle on a substring handling expression that will do the following:
Given a substring of a parent folder
Display all entries in a list that are exactly one level below that folder
Example strings:
VL:c|306464768|1|646|149640|/Volumes/Argest/GoProMix/
VL:c|306464768|1|15364|149640|/Volumes/Argest/GoProMix/.DS_Store
VL:c|306464768|1|16213743536|149640|/Volumes/Argest/GoProMix/GOPR0226.mov
VL:c|324560896|1|1221811|158476|/Volumes/Argest/GoProMix/GOPR0226.mov.asd
VL:c|324562944|1|238|158477|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014 Project/
VL:c|324562944|1|6148|158477|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014 Project/.DS_Store
VL:c|324562944|1|102|158477|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014 Project/Ableton Project Info/
VL:c|324562944|1|459|158477|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014 Project/Ableton Project Info/Project8_1.cfg
VL:c|324562944|1|11499|158477|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014 Project/GoProDjMix_01_11_2014.als
VL:c|324562944|1|0|158477|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014 Project/Icon
VL:c|324562944|1|136|158477|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014 Project/Samples/
VL:c|324562944|1|6148|158477|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014 Project/Samples/.DS_Store
VL:c|324562944|1|68|158477|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014 Project/Samples/Recorded/
VL:c|324562944|1|881755162|158477|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014.aif
VL:c|325545984|1|3772193|158957|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014.aif.asd
VL:c|325550080|1|439195728|158959|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014.mov
VL:c|326039552|1|1442304044|159198|/Volumes/Argest/GoProMix/GoProDJMix_01_11_2014.wav
VL:c|327649280|1|3971227|159984|/Volumes/Argest/GoProMix/GoProDJMix_01_11_2014.wav.asd
VL:c|327655424|1|15985573296|159987|/Volumes/Argest/GoProMix/GP010226.mov
VL:c|345495552|1|1221203|168698|/Volumes/Argest/GoProMix/GP010226.mov.asd
VL:c|345497600|1|16020452784|168699|/Volumes/Argest/GoProMix/GP020226.mov
VL:c|363376640|1|1212815|177429|/Volumes/Argest/GoProMix/GP020226.mov.asd
VL:c|363378688|1|2921821236|177430|/Volumes/Argest/GoProMix/GP030226.mov
VL:c|366639104|1|344063|179022|/Volumes/Argest/GoProMix/GP030226.mov.asd
VL:c|366639104|1|204|179022|/Volumes/Argest/GoProMix/HQ_ConvertedMix/
VL:c|366639104|1|19582987691|179022|/Volumes/Argest/GoProMix/HQ_ConvertedMix/GOPR0226.mov
VL:c|388495360|1|19306366379|189694|/Volumes/Argest/GoProMix/HQ_ConvertedMix/GP010226.mov
VL:c|410042368|1|19346663851|200215|/Volumes/Argest/GoProMix/HQ_ConvertedMix/GP020226.mov
VL:c|431634432|1|3536776751|210758|/Volumes/Argest/GoProMix/HQ_ConvertedMix/GP030226.mov
For example - given the path “/Volumes/Argest/GoProMix/”, I would want a return of all of the files and folders in that folder while not including the files / folders that are 2+ levels deep. So that the response only includes:
VL:c|306464768|1|15364|149640|/Volumes/Argest/GoProMix/.DS_Store
VL:c|306464768|1|16213743536|149640|/Volumes/Argest/GoProMix/GOPR0226.mov
VL:c|324560896|1|1221811|158476|/Volumes/Argest/GoProMix/GOPR0226.mov.asd
VL:c|324562944|1|238|158477|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014 Project/
VL:c|324562944|1|881755162|158477|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014.aif
VL:c|325545984|1|3772193|158957|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014.aif.asd
VL:c|325550080|1|439195728|158959|/Volumes/Argest/GoProMix/GoProDjMix_01_11_2014.mov
VL:c|326039552|1|1442304044|159198|/Volumes/Argest/GoProMix/GoProDJMix_01_11_2014.wav
VL:c|327649280|1|3971227|159984|/Volumes/Argest/GoProMix/GoProDJMix_01_11_2014.wav.asd
VL:c|327655424|1|15985573296|159987|/Volumes/Argest/GoProMix/GP010226.mov
VL:c|345495552|1|1221203|168698|/Volumes/Argest/GoProMix/GP010226.mov.asd
VL:c|345497600|1|16020452784|168699|/Volumes/Argest/GoProMix/GP020226.mov
VL:c|363376640|1|1212815|177429|/Volumes/Argest/GoProMix/GP020226.mov.asd
VL:c|363378688|1|2921821236|177430|/Volumes/Argest/GoProMix/GP030226.mov
VL:c|366639104|1|344063|179022|/Volumes/Argest/GoProMix/GP030226.mov.asd
VL:c|366639104|1|204|179022|/Volumes/Argest/GoProMix/HQ_ConvertedMix/
Kem, I’m sure that it would help more than me, but if that could be described in relationship to how it would be created in RegEx Rx, it would be like teaching us to fish instead of giving us a fish :).
Tim