-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Invalid regular expressions now produce empty outputs with
XX
(`r…
…egexp`) on Octave, like they do in Matlab * Invalid regular expressions now do nothing with `YX` (`regexprep`) on Octave, like they do in Matlab * `YX` now converts cell array contents into char, like `XX` does * `matl -e` not correctly produces automatic comments for `break` and `continue * `e` (`reshape`) with second input logical now works as follows: contiguous equal values indicate dimensions that will be collapsed; and a final `[]` is implicit
- Loading branch information
Showing
8 changed files
with
48 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
function varargout = regexp(varargin) | ||
% If regular expression is invalid, instead of an error it gives empty outputs, | ||
% like Matlab does. For that we use a try...catch block; if an error is found we | ||
% use an empty regexp to produce empty outputs | ||
nargout = max(nargout,1); | ||
try | ||
[varargout{1:nargout}] = builtin('regexp', varargin{:}); | ||
catch | ||
varargin{2} = ''; | ||
[varargout{1:nargout}] = builtin('regexp', varargin{:}); | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
function varargout = regexprep(varargin) | ||
% If regular expression is invalid, instead of an error it gives empty outputs, | ||
% like Matlab does. For that we use a try...catch block; if an error is found we | ||
% use an empty regexp to produce empty outputs | ||
nargout = max(nargout,1); | ||
try | ||
[varargout{1:nargout}] = builtin('regexprep', varargin{:}); | ||
catch | ||
varargin{2} = ''; | ||
[varargout{1:nargout}] = builtin('regexprep', varargin{:}); | ||
end | ||
end |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters