Difference between Matlab and Octave using regexp with 'once'

Jaroslav Hajek highegg at gmail.com
Wed Jun 18 14:05:30 CDT 2008


The attached patch fixes Octave's behaviour to be Matlab compatible.

2008/6/18 Neitzel Karl-Ernst SGD EAZE * <Karl-Ernst.Neitzel at zf-lenksysteme.com>:
> MATLAB 7.5.0.342 (R2007b):
>
>>> regexp('This is an example','^\S*','match')
>
> ans =
>
>     'This'
>
>>> regexp('This is an example','^\S*','match','once')
>
> ans =
>
> This
>
> OCTAVE 3.0.1:
>
>>> regexp('This is an example','^\S*','match')
> ans =
>
> {
>   [1,1] = This
> }
>
>>> regexp('This is an example','^\S*','match','once')
> ans =
>
> {
>   [1,1] = This
> }
>
> ----------------
> Vorsitzender des Aufsichtsrats: Hans-Georg Härter
> Geschäftsführung: Michael Hankel (Vorsitz), Bertram Hoffmann, Wolfgang
> Runge, Karl-Heinz Schrödl, Wolfgang Zeitz
> Sitz: Schwäbisch Gmünd - Handelsregistereintrag: Amtsgericht Ulm HRB 701678
>
> Achtung: Die Werke der ZFLS in Schwäbisch Gmünd liegen seit 1. März 2008 in
> einer Umweltzone
> http://www.zf-lenksysteme.com/index.php?bwp=m:9-n:20-s:-o:-l:1-p:1-na:2
>
>
>
> _______________________________________________
> Bug-octave mailing list
> Bug-octave at octave.org
> https://www.cae.wisc.edu/mailman/listinfo/bug-octave
>
>



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: regexp-fix.diff
Type: text/x-patch
Size: 6156 bytes
Desc: not available
Url : https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080618/d169a38a/attachment.bin 


More information about the Bug-octave mailing list