ExtractBetween: Element 2 of the text contains 1 substrings while the previous elements have 0. All elements must contain the same number of substrings.

6 次查看(过去 30 天)
Error using extractBetween (line 79)
Element 2 of the text contains 1 substrings while the previous elements have 0. All
elements must contain the same number of substrings.
files_in_folder = dir('directory/*.mp4');
{files_in_folder.name}
id = extractBetween({files_in_folder.name}, 'file_', '_');
%an example file name would be file_123_test.mp4
The output of {files_in_folder.name} holds and extra file named '.mp4' with no title, just the file extentions mp4. I checked the directory but ther is no such file called '.mp4'.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by