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: Rik
Subject: [Octave-bug-tracker] [bug #38149] regexp doesn't return empty tokens -- they just disappear
Date: Fri, 01 Feb 2013 17:48:02 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0

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

Okay, at least I got 1 out of 5 answers.

Let's try the following:


te = regexp ('abc', 'abc(z?)', 'tokenExtents');
celldisp (te)

te = regexp ('abce', '((a)(z)?b(c)(z*))(z)?(e)?', 'tokenExtents');
celldisp (te)

[T, TE, NM] = regexp (sprintf('%s','John Davis\nRogers, James'),
'(?<first>\w+)\s+(?<last>\w+)|(?<last>\w+),\s+(?<first>\w+)', 'tokens',
'tokenExtents', 'names');

celldisp (T)
celldisp (TE)
NM(1).first
NM(1).last
NM(2).first
NM(2).last




    _______________________________________________________

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]