octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens --


From: anonymous
Subject: [Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens -- they just disappear
Date: Fri, 25 Jan 2013 07:18:54 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0

Follow-up Comment #2, bug #38149 (project octave):

MATLAB (2011b):
>> [S, E, TE, M, T, NM, SP] = regexp ('bar2','^(foo)?bar(d*)$')
S =
     1
E =
     4
TE = 
    [2x2 double]
M = 
    'bar2'
T = 
    {1x2 cell}
NM = 
1x1 struct array with no fields.
SP = 
    ''    ''
>> TE{:}
ans =
     1     0
     4     4
>> T{:}
ans = 
    ''    '2'
>> [S, E, TE, M, T, NM, SP] = regexp ('bar2','^bar(z)?(d*)$')
S =
     1
E =
     4
TE = 
    [2x2 double]
M = 
    'bar2'
T = 
    {1x2 cell}
NM = 
1x1 struct array with no fields.
SP = 
    ''    ''
>> TE{:}
ans =
     4     3
     4     4
>> T{:}
ans = 
    ''    '2'

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38149>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]