Path: news.mathworks.com!not-for-mail
From: Jason Breslau <tendiamonds@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: REGEXP extract data
Date: Fri, 18 Jan 2008 15:10:18 -0500
Organization: The MathWorks, Inc.
Lines: 18
Message-ID: <fmr13a$rqp$1@fred.mathworks.com>
References: <fmqt09$mtb$1@fred.mathworks.com>
NNTP-Posting-Host: breslauj.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1200687018 28505 144.212.105.200 (18 Jan 2008 20:10:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 18 Jan 2008 20:10:18 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
In-Reply-To: <fmqt09$mtb$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:446397



Assuming your data is all non-digits, followed by digits, try using 
named tokens:

 >> names = regexp(aa, '^(?<aa1>\D*+)(?<aa2>\d*+)$', 'names');
 >> names = [names{:}];
 >> aa1 = {names.aa1}

aa1 =

     'BI'    'EVB'    'C'    'St Vermont'    'DD'

 >> aa2 = {names.aa2}

aa2 =

     '234'    '67'    '4566'     ''     ''

-=>J