How to use regexp to split the filepath

4 次查看(过去 30 天)
file path= C:\Data\Project\PCOD\PCOD_Model.mdl
I want the model path only like C:\Data\Project\PCOD\.... how can I do it

采纳的回答

Image Analyst
Image Analyst 2013-5-3
Use the fileparts() function, not regexp():
[folder, baseFileName, extension] = fileparts(yourFilePath);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by