[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: Regular expression library choices
From: Rob Gillen <rgillen () webmd ! net>
Date: 2001-11-06 16:23:51
[Download RAW message or body]
Okay, I got word back from John Maddock, the author of Regex++. I
learned something new, and something about POSIX regular expressions,
something that perhaps wasn't too clear to me. This is a snippet of
what he has to say:
The main difference is in the way things are matched: POSIX (and
regex++) uses the "leftmost longest rule", while perl uses a
"greedy/non-greedy" mechanism - for example ".*([a-zA-Z]*).*" $1
will match the first word under POSIX rules and the last word under
perl/Javascript rules.
I keep meaning to investigate adding a "perl compatible matching
mode" to regex++, but haven't found the time (and probably won't
this side of Christmas).
So, I was wrong, and it appears, unfortunately, that Regex++ probably
isn't going to work at this time. It's a shame, because it really is a
very nice library.
Rob
Rob Gillen wrote:
> Are you sure that Regex++ does not understand ECMAScript regular
> expressions? Perhaps I am misunderstanding something. Regex++
> understands POSIX expressions for compatibility with the older regex
> library. As you no doubt know, ECMAScript regular expressions are based
> on Perl5 regular expressions. Regex++ does indeed seem to handle almost
> everything that Perl regular expressions can handle. There are probably
> a few exceptions, but the only ones that I can immediately find in the
> documentation is zero-width positive and negative lookaheads. I've
> written author of Regex++ for his thoughts on Regex++ vs. ECMAScript
> regex capabilities. Hopefully, soon, I'll hear back from him on the
> topic and I'll let everyone know more.
--
Rob Gillen
WebMD, Midtown-Atlanta
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic