From: Paul K. <pki...@us...> - 2005-09-07 00:38:18
|
Yes, I added regexp before it was available in matlab. Please update=20 the interface to be compatible. Please see the list for a discussion about escape characters in=20 strings. My understanding is that recent versions of octave default to=20= string constants which do not process string escapes, and so should be=20= compatible with matlab. Thanks, - Paul On Sep 6, 2005, at 9:04 AM, Stefan van der Walt wrote: > Regexp follows Paul Kienzle's convention, rather than MATLAB's. I > think it was probably coded before MATLAB had regexp? 'pcregexp' > follows the same convention as 'regexp', so if you update the > interface, please look at both. > > Regards > St=E9fan > > P.S. Metasymbols work with `pcregexp' > > On Tue, Sep 06, 2005 at 08:33:53AM -0400, Hall, Benjamin wrote: >> There is an interface incompatibility between octave-forge regexp and >> Matlab's regexp, most importantly, the order of the inputs >> >> Octave: >> [match s1 s2 ...] =3D regexp(pattern,string) >> >> Matlab: >> [START,FINISH,TOKENS] =3D REGEXP(STRING,EXPRESSION) >> >> Also, I don't know if it is me, but I have never been able to get any=20= >> of the >> metasymbols to work: >> >> pat =3D '(\d)+'; ## Octave complains about "\d", so >> pat =3D '(\\d)+'; >> >> str =3D 'number of points is 475' >> >> regexp(pat,str) >> >> returns an empty matrix. > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle=20 > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing=20= > & QA > Security * Process Improvement & Measurement *=20 > http://www.sqe.com/bsce5sf > _______________________________________________ > Octave-dev mailing list > Oct...@li... > https://lists.sourceforge.net/lists/listinfo/octave-dev > |