bugGNU Octave - Bugs: bug #56927, textscan format '%q' does not...


bug #56927: textscan format '%q' does not produce Matlab-compatible results for corner case where pattern fails

Submitted by:  Rik <rik5>
Submitted on:  Fri 20 Sep 2019 06:58:40 PM UTC  
Category:  Octave Function Severity:  2 - Minor
Priority:  1 - Later Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 20 Sep 2019 06:58:40 PM UTC, original submission:  

Sample code to reporduce

textscan ('"a,b","c"trailing', '%q', 'delimiter', ',')
ans =
  [1,1] =
    [1,1] = a,b
    [2,1] = c
    [3,1] = trailing


In Matlab, there are only two outputs, not three, and the second output is "ctrailing".  In other words, the section of text not matching the pattern, but occurring before a delimiter, is appended to the last format match.

This is an obscure corner case and I am merely noting it, rather than suggesting it get fixed.

Rik <rik5>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-09-20 rik5 Priority5 - Normal => 1 - Later

    Back to the top

    Powered by Savane 3.5