Wed 15 Jun 2011 11:58:49 AM UTC, comment #3:
Dear Jochen,
I get the same type of error when using 'regexprep' on a string. Adding a space before or after the string does not resolve the problem for me.
I have compiled 3.4.0 with gcc on ubuntu linux 11.04 (on a MBP 6,2) with:
$> dpkg --list |grep pcre
ii libpcre++-dev 0.9.5-5 C++ wrapper class for pcre (development)
ii libpcre3 8.12-3ubuntu2 Perl 5 Compatible Regular Expression Library - runtime files
ii libpcre3-dev 8.12-3ubuntu2 Perl 5 Compatible Regular Expression Library - development files
ii libpcrecpp0 8.12-3ubuntu2 Perl 5 Compatible Regular Expression Library - C++ runtime files
$>
no matter what string I process with regexrep, I alway get error '-24'.
Is there a way to debug this in more detail than what you've done sofar?
|
Sun 08 May 2011 12:36:57 AM UTC, comment #2:
Quite possible... For my Octave 3.4.0 version (I downloaded a .dmg file, as I don't have the necessary tools installed to compile on my Macbook...), the filenames suggest a very early lib for PCRE.
Most filenames in the $INSTALL/Contents/Resources/lib subfolder have a "reasonable" version number in the filename (e.g. libfftw3.3.1.2.dylib), but the PCRE libs are:
libpcre.0.0.1.dylib
libpcrecpp.0.0.0.dylib
libpcreposix.0.0.0.dylib
(with filedates being all Oct 1 2009) suggesting that the PCRE libraries better be updated by the Mac OSX Octave maintainer ;)
Thanks for pointing this out! (I fixed the questionable expression match patterns, and now there are no more error messages).
For those interested, the package (toolbox, developed under Matlab v7.5 through v7.11) that I'm developing is available under http://neuroelf.net/ and I'm now trying to get as much functionality working in Octave as possible. Unfortunately, the GUI functions (figure, uicontrol, etc.) are currently too diversely supported (JHandles, java not available for all platforms/newest Octave release; some function calls not supported as with Matlab, such as figure(FIG_PROP_STRUCT); to create a figure with all properies set, incl. the CreateFcn, for instance!). The command line functionality start to be "usable", but there is still a long way to go...
Cheers,
/jochen
|
Sat 07 May 2011 02:02:57 PM UTC, original submission:
I stumbled across this error when using the syntax:
If TEXTVAR contains at least one space character at the end, no error occurs. If, however, no spaces are at the end, I receive an error:
I understand that the pattern should be more correct:
which works fine. So I'm not sure how much of a "coding" problem (on my part) this is, but I would still say that this should not happen:
Matlab handles these cases fine (no replacement, as the pattern is, in effect, empty). I don't know how much control you have when calling the PCRE library functions, but I think it would be nice to not have an error thrown if the pattern resolves to an empty string (hence Item Group Improvement/Optimization...).
Cheers,
/jochen
|