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

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

[Octave-bug-tracker] [bug #50500] Behavior of dir() changed and is diffe


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #50500] Behavior of dir() changed and is different from Matlab now
Date: Wed, 8 Mar 2017 22:25:57 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0

Follow-up Comment #4, bug #50500 (project octave):

I'm not as familiar with regexp family commands as I should be, but it does
seem like that regexprep() command is attempting to remove the path, but
apparently not quite correctly.  Here's the expression after the file
separator is printed:

(?:^|^.+[/])([^/.]*.[^/]*)?$

That front () is $1, correct?  The second () is $2?  So why is the regexprep
using $1, rather than $2?


        fn = regexprep (fn, re, '$1')


I would think that the file name is on the right side, i.e., $2, and the
expression should be fashioned so that $1 comes out '' if there is no path.

Also, it seems that spaces in file names act the same, but may want to test
that works.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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