|
From: | Przemek Klosowski |
Subject: | Re: Help with regexp testing |
Date: | Fri, 06 Apr 2012 12:36:56 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 |
On 04/06/2012 11:57 AM, Ben Abbott wrote:
On Apr 6, 2012, at 11:42 AM, Rik wrote:I'm trying to implement the 'emptymatch' option for regexp. Could someone with access to Matlab try the following four lines and send back the results? [S, E, TE, M, T, NM, SP] = regexp ('MATLAB', '[MAT]*') [S, E, TE, M, T, NM, SP] = regexp ('MATLAB', '([MAT]*)') [S, E, TE, M, T, NM, SP] = regexp ('MATLAB', '[MAT]*', 'emptymatch') [S, E, TE, M, T, NM, SP] = regexp ('MATLAB', '([MAT]*)', 'emptymatch')
[S, E, TE, M, T, NM, SP] = regexp ('MATLAB', '[MAT]*') S = 1 5
it depends on Matlab version. I have an ancient 6.5 which returns "??? Error using ==> regexp Too many output arguments." in each case
[Prev in Thread] | Current Thread | [Next in Thread] |