[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regexp: how to split a cellstr array into substring arrays, each mat
From: |
Mike Miller |
Subject: |
Re: regexp: how to split a cellstr array into substring arrays, each matching regular expressions |
Date: |
Mon, 21 May 2012 16:48:13 -0400 |
On Mon, May 21, 2012 at 3:47 PM, Philip Nienhuis <address@hidden> wrote:
> Philip Nienhuis wrote:
>> [...]
>> BTW,
>> octave:184> ar = {'abcdefguvwxAny' ; 'acegxyzTrailing'; 'aJunk'}
>> ar =
>> {
>> [1,1] = abcdefguvwxAny
>> [2,1] = acegxyzTrailing
>> [3,1] = Junk
>> }
>> octave:186> tt = regexp (ar, '[uvwxyz].*', 'match', 'once')
>> tt =
>> {
>> [1,1] = uvwxAny
>> [2,1] = xyzTrailing
>> [3,1] = unk
>> }
>>
>> => is this a bug? (swallowing the "J" from the last entry)
> [...]
> I still have to check with ML on the last question (swallowing characters).
I don't see a bug, "[uvwzyx].*" matches "unk", right? Maybe "Junk"
was a bad choice for this example? :)
--
mike