octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PCRE library requirement


From: John W. Eaton
Subject: Re: PCRE library requirement
Date: Mon, 31 Jan 2011 16:50:25 -0500

On 31-Jan-2011, Rik wrote:

| The regular expression '\b\w+\b' can be simplified to just '\w+'.  However,
| I'd still like Richard to run a test if possible.  It would seem from this
| chart (http://www.regular-expressions.info/refflavors.html) that even '\w+'
| is not supported by POSIX regular expressions.  It appears that the reason
| this code works on most UNIX boxes without PCRE is that those machines have
| GNU libraries.  Thus, not having PCRE is not the equivalent of POSIX, but
| rather equals GNU regular expressions support.  So, I would have Richard
| try the following in an Octave built without PCRE.
| 
| str = "a ab abc"
| results = regexp (str, '\w+', "match")
| 
| If that fails because the actual libraries are truly POSIX compliant then I
| think we should make PCRE a requirement.  It is widely available and a
| number of patterns in the code use the very convenient '\s' or '\w'
| patterns rather than character classes.

This sort of problem seems like it will probably never end because
people will likely not check to see that their regexps perform as
expected in the absence of PCRE.  So I'm in favor of making PCRE a
requirement for building Octave, but I think we should not do that
until after 3.4 is released.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]