[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48883] regexp(rep): Matlab compatibility with
From: |
Kai Torben Ohlhus |
Subject: |
[Octave-bug-tracker] [bug #48883] regexp(rep): Matlab compatibility with empty match groups. |
Date: |
Wed, 24 Aug 2016 12:49:49 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?48883>
Summary: regexp(rep): Matlab compatibility with empty match
groups.
Project: GNU Octave
Submitted by: siko1056
Submitted on: Wed 24 Aug 2016 02:49:46 PM CEST
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: In Progress
Assigned to: siko1056
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
I hope it is an easy one:
Matlab R2016a:
>> regexprep ('abc', '(^|a)(b)(c)', 'IN$2$3')
ans = INbc
>> regexprep ('bc', '(^|a)(b)(c)', 'IN$2$3')
ans = INbc
>> [~,~,~,a,b]=regexp ('bc', '(^|a)(b)(c)')
a = 'bc'
b = {1x3 cell}
>> b{:}
ans = '' 'b' 'c'
Octave:
>> regexprep ('abc', '(^|a)(b)(c)', 'IN$2$3')
ans = INbc
>> regexprep ('bc', '(^|a)(b)(c)', 'IN$2$3')
ans = INc
>> [~,~,~,a,b]=regexp ('bc', '(^|a)(b)(c)')
a =
{
[1,1] = bc
}
b =
{
[1,1] =
{
[1,1] = b
[1,2] = c
}
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48883>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #48883] regexp(rep): Matlab compatibility with empty match groups.,
Kai Torben Ohlhus <=