[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:39:23 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 |
Follow-up Comment #8, bug #38149 (project octave):
Maybe this more explicit code will work.
well, does not look like it:
>> te = regexp ('abc', 'abc(z?)', 'tokenExtents');
>> disp (te)
[1x2 double]
>>
>> te = regexp ('abc', 'abc(z)?', 'tokenExtents');
>> disp (te)
[1x2 double]
>>
>> [T, TE, NM] = regexp (sprintf('%s','John DavisnRogers, James'),
??? [T, TE, NM] = regexp (sprintf('%s','John DavisnRogers, James'),
|
Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.
>> '(?<first>w+)s+(?<last>w+)|(?<last>w+),s+(?<first>w+)', 'tokens',
ans =
(?<first>w+)s+(?<last>w+)|(?<last>w+),s+(?<first>w+)
ans =
tokens
>> 'tokenExtents', 'names');
??? 'tokenExtents', 'names');
|
Error: Unbalanced or unexpected parenthesis or bracket.
>> disp (T)
??? Undefined function or variable 'T'.
>> disp (TE)
??? Undefined function or variable 'TE'.
>> disp (NM)
??? Undefined function or variable 'NM'.
>>
>> te = regexp ('abce', '((a)(z)?b(c)(z*))(z)?(e)?', 'tokenExtents');
>> disp (te)
[3x2 double]
>>
>> [S, E, TE, M, T, NM, SP] = regexp ('abc',
??? [S, E, TE, M, T, NM, SP] = regexp ('abc',
|
Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.
>> '(?<all>(a)(?<miss1>z?)b(?<hit1>c)(z*))')
??? '(?<all>(a)(?<miss1>z?)b(?<hit1>c)(z*))')
|
Error: Unbalanced or unexpected parenthesis or bracket.
>>
>> disp (TE)
??? Undefined function or variable 'TE'.
>> disp (T)
??? Undefined function or variable 'T'.
>> disp (NM)
??? Undefined function or variable 'NM'.
>>
>>
_______________________________________________________
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 <=
- [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
- [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