bugGNU Octave - Bugs: bug #51093, textscan option...

 
 

bug #51093: textscan option MultipleDelimsAsOne does not apply to space or tab characters

Submitted by:  Guillaume <gyom>
Submitted on:  Tue 23 May 2017 10:39:46 AM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  Open
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Wed 24 May 2017 11:25:14 AM UTC, comment #2: 

This may be related to deficiencies in the default sets of whitespace and delimiter characters.

Philip Nienhuis <philipnienhuis>
Project Member
Tue 23 May 2017 07:23:08 PM UTC, comment #1: 

Confirmed, same with either a space or tab character. Does not affect other more rare space characters like \f or \v.

Mike Miller <mtmiller>
Project Administrator
Tue 23 May 2017 10:39:46 AM UTC, original submission:  

The option MultipleDelimsAsOne does not seem to work under certain circumstances:

>> textscan(sprintf('a\t\tb\tc'),'%s','Delimiter','\t','MultipleDelimsAsOne',false)
ans =
{
  [1,1] =
  {
    [1,1] = a
    [2,1] = b
    [3,1] = c
  }
}

Matlab returns {{'a';'';'b';'c'}} as expected. It works with a different delimiter, eg:

>> textscan('a//b/c','%s','Delimiter','/','MultipleDelimsAsOne',false)
ans =
{
  [1,1] =
  {
    [1,1] = a
    [2,1] =
    [3,1] = b
    [4,1] = c
  }
}

Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

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 philipnienhuis
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by gyom (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.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-05-28 philipnienhuis Carbon-Copy- => Added philipnienhuis
    2017-05-23 mtmiller StatusNone => Confirmed
        Summarytextscan with option MultipleDelimsAsOne => textscan option MultipleDelimsAsOne does not apply to space or tab characters

    Back to the top


    Powered by Savane 3.5