Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

regexp cell array problem

Status
Not open for further replies.

KoenDV

Electrical
Joined
Nov 15, 2006
Messages
1
Location
BE
Hey,

I'm really stuck on this. I'm trying to use regexp twice once for all the files i need to work with and then again to narrow it down even more.

textfiles = dir('*.txt');
filenames = {textfiles.name};
filenames = regexp(filenames, '^sn\d{4}_INS_(LOW|HIGH)_\d+_\d+_(A|B).txt$', 'match');
startfilenames = regexp(filenames, '^sn\d{4}_INS_LOW_\d+_\d+_A.txt$', 'match');

After the first regexp filenames seems to be a cell array. It needs to be an cell array of string to be used by regexp again. I tried tons of thing like char, cellstr, cell, iscell, iscellstr... Tried some functions of the net and avery thing i can think of using round, square and curly brakets. So can anyone please help me?

Thx
Koen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top