[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens --
From: |
Michael Godfrey |
Subject: |
[Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens -- they just disappear |
Date: |
Fri, 01 Feb 2013 16:58:34 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 |
Follow-up Comment #10, bug #38149 (project octave):
Oops. I cut and pasted from email.
Here is try from savannah
(with TE{:} at the end -- did not help)
>> [T, TE, NM] = regexp (sprintf('%s','John DavisnRogers, James'),
'(?<first>w+)s+(?<last>w+)|(?<last>w+),s+(?<first>w+)', 'tokens',
'tokenExtents', 'names');
>> disp (T)
{1x2 cell} {1x2 cell}
>> disp (TE)
[2x2 double] [2x2 double]
>> disp (NM)
1x2 struct array with fields:
last
first
>>
>> te = regexp ('abce', '((a)(z)?b(c)(z*))(z)?(e)?', 'tokenExtents');
>> disp (te)
[3x2 double]
>>
>> [S, E, TE, M, T, NM, SP] = regexp ('abc',
'(?<all>(a)(?<miss1>z?)b(?<hit1>c)(z*))')
S =
[]
E =
[]
TE =
{}
M =
{}
T =
{}
NM =
0x0 struct array with fields:
all
SP =
'abc'
>>
>> disp (TE)
>> disp (T)
>> disp (NM)
>>
>> TE{:}
>>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?38149>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens -- they just disappear, Michael Godfrey, 2013/02/01
- [Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens -- they just disappear, Rik, 2013/02/01
- [Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens -- they just disappear, Michael Godfrey, 2013/02/01
- [Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens -- they just disappear, Rik, 2013/02/01
- [Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens -- they just disappear,
Michael Godfrey <=
- [Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens -- they just disappear, Rik, 2013/02/01
- [Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens -- they just disappear, Michael Godfrey, 2013/02/01
- [Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens -- they just disappear, Rik, 2013/02/01
- [Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens -- they just disappear, Michael Godfrey, 2013/02/01